Skip to content

Commit

Permalink
Template fix for SCSS
Browse files Browse the repository at this point in the history
  • Loading branch information
techlab committed Jul 22, 2020
1 parent 00484ba commit d12cd55
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-jquery-plugin",
"version": "1.0.3",
"version": "1.0.4",
"description": "CLI for creating ready-to-start modern jQuery Plugins",
"main": "index.js",
"bin": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
// Initial Method
_init() {
// Plugin init and logic
this.main.addClass(this.options.myStyle);
this.main.addClass(this.options.myStyle).html(this.options.myStyle);
}

// TODO: YOU CAN ADD MORE FUNCTIONS FOR YOUR PLUGIN HERE
Expand Down
14 changes: 7 additions & 7 deletions templates/javascript_sass/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var SRC_SCSS = 'src/scss/*.scss';

// Specify the Destination folders
var DEST_JS = 'dist/js';
var DEST_SCSS = 'dist/css';
var DEST_CSS = 'dist/css';

// Example pages
var EXAMPLE_HTML = 'examples/*.html';
Expand Down Expand Up @@ -53,10 +53,10 @@ function build_scss(cb) {
.pipe(sass({outputStyle:'expanded'}).on('error', sass.logError))
.pipe(postcss( [autoprefixer()] ))
.pipe(cssbeautify({ autosemicolon: true }))
.pipe(gulp.dest(DEST_SCSS))
.pipe(gulp.dest(DEST_CSS))
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest(DEST_SCSS));
.pipe(gulp.dest(DEST_CSS));

cb();
}
Expand All @@ -77,8 +77,8 @@ function clean_js(cb) {
cb();
}

function clean_scss(cb) {
del.sync([DEST_SCSS]);
function clean_css(cb) {
del.sync([DEST_CSS]);

cb();
}
Expand Down Expand Up @@ -120,8 +120,8 @@ function test(cb) {
}

// EXPORT methods
exports.clean = gulp.parallel(clean_js, clean_scss);
exports.build = gulp.parallel(gulp.series(clean_js, lint_js, build_js), gulp.series(clean_scss, build_scss));
exports.clean = gulp.parallel(clean_js, clean_css);
exports.build = gulp.parallel(gulp.series(clean_js, lint_js, build_js), gulp.series(clean_css, build_scss));
exports.lint = lint_js;
exports.watch = watch;
exports.test = test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
// Initial Method
_init() {
// Plugin init and logic
this.main.addClass(this.options.myStyle);
this.main.addClass(this.options.myStyle).html(this.options.myStyle);
}

// TODO: YOU CAN ADD MORE FUNCTIONS FOR YOUR PLUGIN HERE
Expand Down

0 comments on commit d12cd55

Please sign in to comment.