Skip to content

Commit d12cd55

Browse files
committed
Template fix for SCSS
1 parent 00484ba commit d12cd55

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-jquery-plugin",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "CLI for creating ready-to-start modern jQuery Plugins",
55
"main": "index.js",
66
"bin": {

templates/javascript_css/src/js/jquery-plugin-boilerplate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
// Initial Method
5858
_init() {
5959
// Plugin init and logic
60-
this.main.addClass(this.options.myStyle);
60+
this.main.addClass(this.options.myStyle).html(this.options.myStyle);
6161
}
6262

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

templates/javascript_sass/gulpfile.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var SRC_SCSS = 'src/scss/*.scss';
2222

2323
// Specify the Destination folders
2424
var DEST_JS = 'dist/js';
25-
var DEST_SCSS = 'dist/css';
25+
var DEST_CSS = 'dist/css';
2626

2727
// Example pages
2828
var EXAMPLE_HTML = 'examples/*.html';
@@ -53,10 +53,10 @@ function build_scss(cb) {
5353
.pipe(sass({outputStyle:'expanded'}).on('error', sass.logError))
5454
.pipe(postcss( [autoprefixer()] ))
5555
.pipe(cssbeautify({ autosemicolon: true }))
56-
.pipe(gulp.dest(DEST_SCSS))
56+
.pipe(gulp.dest(DEST_CSS))
5757
.pipe(cleanCSS({compatibility: 'ie8'}))
5858
.pipe(rename({suffix: '.min'}))
59-
.pipe(gulp.dest(DEST_SCSS));
59+
.pipe(gulp.dest(DEST_CSS));
6060

6161
cb();
6262
}
@@ -77,8 +77,8 @@ function clean_js(cb) {
7777
cb();
7878
}
7979

80-
function clean_scss(cb) {
81-
del.sync([DEST_SCSS]);
80+
function clean_css(cb) {
81+
del.sync([DEST_CSS]);
8282

8383
cb();
8484
}
@@ -120,8 +120,8 @@ function test(cb) {
120120
}
121121

122122
// EXPORT methods
123-
exports.clean = gulp.parallel(clean_js, clean_scss);
124-
exports.build = gulp.parallel(gulp.series(clean_js, lint_js, build_js), gulp.series(clean_scss, build_scss));
123+
exports.clean = gulp.parallel(clean_js, clean_css);
124+
exports.build = gulp.parallel(gulp.series(clean_js, lint_js, build_js), gulp.series(clean_css, build_scss));
125125
exports.lint = lint_js;
126126
exports.watch = watch;
127127
exports.test = test;

templates/javascript_sass/src/js/jquery-plugin-boilerplate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
// Initial Method
5858
_init() {
5959
// Plugin init and logic
60-
this.main.addClass(this.options.myStyle);
60+
this.main.addClass(this.options.myStyle).html(this.options.myStyle);
6161
}
6262

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

0 commit comments

Comments
 (0)