-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: include compiled css and js in the package (#1028)
* fix: include compiled css and js in the package This PR adjusts the build:package task to also output a compiled minified js and css file. It also fixes the compiled output including jQuery, which didn't work due to jQuery ending up bundled by the umd * fix(version): add version variable to bundle js (#1024)
- Loading branch information
Showing
7 changed files
with
59 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const autoprefixer = require("autoprefixer"); | ||
const cssnano = require("cssnano"); | ||
const gulp = require("gulp"); | ||
const postcss = require("gulp-postcss"); | ||
const rename = require("gulp-rename"); | ||
const sass = require("gulp-sass")(require("sass")); | ||
|
||
gulp.task("build:css", () => { | ||
return gulp | ||
.src("gulp/dist-scss/*.scss") | ||
.pipe(sass()) | ||
.pipe(postcss([autoprefixer, cssnano])) | ||
.pipe( | ||
rename((path) => ({ | ||
dirname: path.dirname, | ||
basename: path.basename.replace("all", "moj-frontend"), | ||
extname: ".min.css", | ||
})) | ||
) | ||
.pipe(gulp.dest("package/moj")); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
MOJFrontend.version = '0.0.0-development' |