Skip to content

Commit

Permalink
renaming undefined version to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
luckylooke committed Apr 19, 2017
1 parent 8b62558 commit 307e812
Show file tree
Hide file tree
Showing 13 changed files with 2,258 additions and 1,907 deletions.
2 changes: 1 addition & 1 deletion controllers/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports.install = function() {
F.file(function(req, res, isValidation) {
if (isValidation) {
// console.log('isValidation URL: ===> ', req.url);
return !!req.url.match(/^\/api\/download\/v\d\.\d\.\d\//);
return !!req.url.match(/^\/api\/download\/(v\d\.\d\.\d|latest)\//);
} else {

var statsExists = fs.existsSync(statsPath);
Expand Down
6 changes: 3 additions & 3 deletions controllers/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ function downloadCtrl(ctrl) {
featuresList: featuresList,
fileSizes: fileSizes,
defaultCfg: defaultCfg,
fullSize: Math.floor(fileSizes['v3.0.0-full-JS.Responsive.full.min.js']/1024) || '',
defaultSize: Math.floor(fileSizes['v3.0.0-default-JS.Responsive.min.js']/1024) || ''
fullSize: Math.floor(fileSizes['latest-full-JS.Responsive.full.min.js']/1024) || '',
defaultSize: Math.floor(fileSizes['latest-default-JS.Responsive.min.js']/1024) || ''
});

}
Expand Down Expand Up @@ -131,5 +131,5 @@ function setLanguage(ctrl, lang, path, firstIsLang) {
else if(firstIsLang)
nextLang = '/' + nextLang;
ctrl.repository.nextLangUrl = firstIsLang ? path.replace(/^\/\w{2}/, nextLang) : '/' + nextLang + path;

}
13 changes: 12 additions & 1 deletion fileSizes.json
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
{"v3.0.0-default-JS.Responsive.js":39477,"v3.0.0-default-JS.Responsive.js.map":60689,"v3.0.0-default-JS.Responsive.min.js.map":95032,"v3.0.0-default-JS.Responsive.zip":60581,"v3.0.0-default-JS.Responsive.min.js":7968,"v3.0.0-full-JS.Responsive.full.js":76929,"v3.0.0-full-JS.Responsive.full.js.map":110188,"v3.0.0-full-JS.Responsive.full.min.js":16217,"v3.0.0-full-JS.Responsive.full.min.js.map":177329,"v3.0.0-full-JS.Responsive.full.zip":116923,"v3.0.0-custom12405-JS.Responsive.custom.js":41639,"v3.0.0-custom12405-JS.Responsive.custom.js.map":63774,"v3.0.0-custom12405-JS.Responsive.custom.min.js":8350,"v3.0.0-custom12405-JS.Responsive.custom.min.js.map":100071,"v3.0.0-custom12405-JS.Responsive.custom12405.zip":63630}
{
"latest-default-JS.Responsive.js": 40134,
"latest-default-JS.Responsive.js.map": 63979,
"latest-default-JS.Responsive.min.js": 8402,
"latest-default-JS.Responsive.min.js.map": 99574,
"latest-default-JS.Responsive.zip": 63423,
"latest-full-JS.Responsive.full.js.map": 121422,
"latest-full-JS.Responsive.full.js": 76235,
"latest-full-JS.Responsive.full.min.js.map": 188947,
"latest-full-JS.Responsive.full.min.js": 17896,
"latest-full-JS.Responsive.full.zip": 128236
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"translate": "cd views && totaljs --translate && cp -f ./views/translate.resource ./resources/en.resource",
"translate_sk": "totaljs -diff ./resources/en.resource ./resources/sk.resource",
"update_hard": "git checkout master && git reset --hard && git clean -f && cd JS.Responsive && git reset --hard && git clean -f && git checkout master && git pull origin master && cd .. && npm run update",
"update": "git pull origin master && git submodule update && cd JS.Responsive.jsdocTmpl && git checkout master && git pull origin master && npm i --production && cd .. && cd JS.Responsive && git pull origin master && npm i && cd node_modules/jsdoc-webpack-plugin && npm i --production && cd ../../.. && node jsdocPreProcessUtil && cd JS.Responsive && npm run build && cd .. && node jsdocProcessUtil",
"update": "git pull origin master && git submodule update && cd JS.Responsive.jsdocTmpl && git checkout master && git pull origin master && npm i --production && cd .. && cd JS.Responsive && git pull origin master && npm i && cd node_modules/jsdoc-webpack-plugin && npm i --production && cd ../../.. && node utils/jsdocPreProcessUtil && cd JS.Responsive && npm run build && cd .. && node utils/jsdocProcessUtil",
"install": "npm rebuild node-sass && git submodule init && npm run update && npm rebuild node-sass",
"templdev": "node jsdocPreProcessUtil && cd JS.Responsive && npm run build && cd .. && node jsdocProcessUtil"
"templdev": "node utils/jsdocPreProcessUtil && cd JS.Responsive && npm run build && cd .. && node utils/jsdocProcessUtil"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 307e812

Please sign in to comment.