diff --git a/gulpfile.js b/gulpfile.js index 20955483..32051080 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -2,6 +2,7 @@ var gulp = require('gulp'); var git = require('gulp-git'); var runSequence = require('run-sequence'); var bump = require('gulp-bump'); +var replace = require('gulp-replace'); gulp.task('x_bump', function(){ gulp.src('./package.json') @@ -9,6 +10,19 @@ gulp.task('x_bump', function(){ .pipe(gulp.dest('./')); }); +gulp.task('cssDev', function(){ + gulp.src(['src/styles/style.css']) + .pipe(replace(/\/\*\*dev_mode_start\*\*\/[^]+\/\*\*dev_mode_end\*\*\//gim, cssDev)) + .pipe(gulp.dest('src/styles/')); +}); + +gulp.task('cssRelease', function(){ + gulp.src(['src/styles/style.css']) + .pipe(replace(/\/\*\*dev_mode_start\*\*\/[^]+\/\*\*dev_mode_end\*\*\//gim, cssRelease)) + .pipe(gulp.dest('src/styles/')); +}); + + /** Dangerous, this will wipe your current source and sync with GitHub **/ gulp.task('vanish***', function (done) { var c = 8; @@ -35,3 +49,28 @@ gulp.task('x_gitReset', function () { if (err) throw err; }); }); + + +var cssRelease = `/**dev_mode_start**/ +small.debug { + color: red; + display: none !important; +} + +small.release { + text-transform: lowercase; + color: #4c4c4c; +} +/**dev_mode_end**/`; + +var cssDev = `/**dev_mode_start**/ +small.debug { + color: red; +} + +small.release { + text-transform: lowercase; + color: #4c4c4c; + display: none !important; +} +/**dev_mode_end**/`; \ No newline at end of file diff --git a/package.json b/package.json index f4d8b1ec..63d83fbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "studioweb", - "version": "0.1.737", + "version": "0.1.740", "license": "Modified GPL (see readme.md)", "angular-cli": {}, "scripts": { @@ -17,16 +17,18 @@ "x_rsync_iw": "rsync --progress --chmod=ug=rwx --chmod=o=rx -av --stats -e ssh /cygdrive/c/msweb/studiolite/dist/ Sean@digitalsignage.com:/var/www/sites/dynasite/htdocs/_msportal/_js/_node/_studioweb/locale/iw", "x_sw": "sw-precache --root=dist --config=sw-precache-config.js", "x_bump": "gulp x_bump", + "x_cssDev": "gulp cssDev", + "x_cssRelease": "gulp cssRelease", "x_translate": "node_modules/.bin/ng-xi18n -p src/tsconfig.json --i18nFormat=xmb", "x_node_copy": "cp -r -f ./node_modules/ ./dist/out-tsc/", "cp module": "cp ./node_modules/ng-mslib/src/myng-component.ts ./node_modules/ng-mslib/dist/", "generate_locale": "npm run x_node_copy && npm run x_translate", "hmr": "ng serve --port 4208 --aot false --hmr -e=hmr", - "dev": "ng serve --port 4208 --aot false", - "release_aot_hebrew": "rm -r -f ./dist && npm run x_bump && npm run x_prod_aot_hebrew && npm run x_sw && npm run x_rsync_iw", - "release_aot": "rm -r -f ./dist && npm run x_bump && npm run x_prod_aot && npm run x_sw && npm run x_rsync", - "release_aot_no_sync": "rm -r -f ./dist && npm run x_bump && npm run x_prod_aot && npm run x_sw", - "release_jit": "rm -r -f ./dist && npm run x_bump && npm run x_prod_jit && npm run x_sw && npm run x_rsync" + "dev": "npm run x_cssDev && ng serve --port 4208 --aot false", + "release_aot_hebrew": "npm run x_cssRelease && rm -r -f ./dist && npm run x_bump && npm run x_prod_aot_hebrew && npm run x_sw && npm run x_rsync_iw", + "release_aot": "npm run x_cssRelease && rm -r -f ./dist && npm run x_bump && npm run x_prod_aot && npm run x_sw && npm run x_rsync", + "release_aot_no_sync": "npm run x_cssRelease && rm -r -f ./dist && npm run x_bump && npm run x_prod_aot && npm run x_sw", + "release_jit": "npm run x_cssRelease && rm -r -f ./dist && npm run x_bump && npm run x_prod_jit && npm run x_sw && npm run x_rsync" }, "dependencies": { "@angular/animations": "^4.1.0", diff --git a/src/styles/style.css b/src/styles/style.css index 7034af69..d00d521c 100644 --- a/src/styles/style.css +++ b/src/styles/style.css @@ -639,17 +639,6 @@ small { display: block; } -small.debug { - color: red; - display: none !important; -} - -small.release { - text-transform: lowercase; - color: #4c4c4c; - /*display: none !important;*/ -} - .panel-title { font-size: 0.9em; } @@ -1593,3 +1582,22 @@ div.kineticjs-content { opacity: 1 !important; } +/**dev_mode_start**/ +small.debug { + color: red; +} + +small.release { + text-transform: lowercase; + color: #4c4c4c; + display: none !important; +} +/**dev_mode_end**/ + + + + + + + +