Skip to content

Commit

Permalink
fix: update package scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
blackfalcon committed Oct 16, 2019
1 parent 772c33f commit 26e2fea
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
18 changes: 18 additions & 0 deletions template/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,24 @@ gulp.task('processDev', function() {
);
});

// task for Development Sass processing
gulp.task('reprocessClean', function() {
// set path to where Sass files are located to be processed
return gulp.src('./altImports/**/*.scss')

// PostCss polyfill pipeline for CSS Custom Properties (CSS variables)
.pipe(postcss([

selectorReplace({
before: [":host", "&(:not(.is-touching))", "&(.focus-visible)"],
after: ["&", "&:not(.is-touching)", "&.focus-visible"],
})
]))

// Output final CSS in destination
.pipe(gulp.dest('./altImports/'));
});

// Sass watcher
gulp.task('sassWatch', function() {
gulp.watch(
Expand Down
17 changes: 12 additions & 5 deletions template/package.temp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"jsonlint": "^1.6.3",
"lodash": "^4.17.11",
"mocha": "^6.1.4",
"npm-run-all": "^4.1.5",
"npm-watch": "^0.6.0",
"postcss": "^7.0.17",
"postcss-custom-properties": "^8.0.10",
Expand All @@ -86,21 +87,27 @@
"sassRender-w": ".src/**/*.scss"
},
"scripts": {
"build": "npm run sassRender | npm run cssLint | npm run jsonLint",
"build": "npm-run-all sassRender cssLint jsonLint",
"buildTokens": "node scripts/tokenScript.js",
"copyFonts": "copyfiles -f ./node_modules/@alaskaairux/orion-web-core-style-sheets/dist/fonts/*.* ./demo/fonts/",
"cssLint": "stylelint './src/*.css'",
"dev": "npm-watch buildTokens | npm-watch sassRender-w",
"dist": "npm run distTokens | npm run sassRender | npm run cssLint | npm run jsonLint",
"dist": "npm-run-all distTokens sassRender cssLint jsonLint",
"distJS": "copyfiles -u 1 -V './src/**/*.js' ./dist",
"distTokens": "node scripts/tokenScriptCustom.js",
"jsonLint": "jsonlint -q ./src/shape.json",
"sassRender": "sass-render src/*.css src/tokens/*.scss",
"sassRender-w": "sass-render -w src/**/*.{scss,css}",
"stylefluxCanonical": "styleflux -o ./src/altImports/canonical/*.css",
"stylefluxVariable": "styleflux -o ./src/altImports/variable/*.css",
"stylefluxCanonical": "styleflux -o ./altImports/canonical/*.css",
"stylefluxVariable": "styleflux -o ./altImports/variable/*.css",
"sweep": "rm -rf ./altImports ./temp ./demo/css ./demo/fonts ./dist ./src/tokens | rm ./demo/sass/*token*.scss ./src/*.css ./src/*-css.js",
"test": "npm run cssLint | npm run jsonLint | yamllint .travis.yml"
"test": "npm-run-all cssLint jsonLint yamltest",
"processSrc": "gulp processSrc",
"processImportsCanonical": "gulp processImportsCanonical",
"processImportsVariable": "gulp processImportsVariable",
"reprocessClean": "gulp reprocessClean",
"ciBuild": "npm-run-all buildTokens processSrc processImportsCanonical processImportsVariable stylefluxCanonical stylefluxVariable reprocessClean distTokens sassRender distJS",
"devBuild": "npm-run-all buildTokens processSrc distTokens sassRender distJS"
},
"husky": {
"hooks": {
Expand Down

0 comments on commit 26e2fea

Please sign in to comment.