vanilla-jet 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.grunt/compile_html.js +1 -10
- package/bin.js +17 -33
- package/framework/server.js +1 -1
- package/gulpfile.js +1 -8
- package/package.json +1 -1
package/.grunt/compile_html.js
CHANGED
|
@@ -10,18 +10,9 @@ let Functions = require('../framework/functions.js');
|
|
|
10
10
|
let Dipper = require('../framework/dipper.js');
|
|
11
11
|
let Config = require(processCwd() + '/config.js');
|
|
12
12
|
|
|
13
|
-
// -- Get environment
|
|
14
|
-
let env = process.argv[2] || 'development';
|
|
15
|
-
if (env === 'dev') { env = 'development'; }
|
|
16
|
-
if (env === 'build:qa') { env = 'qa'; }
|
|
17
|
-
if (env === 'build:staging') { env = 'staging'; }
|
|
18
|
-
if (env === 'build:prod') { env = 'production'; }
|
|
19
|
-
|
|
20
13
|
// -- Init Dipper
|
|
21
14
|
let settings = Config.settings;
|
|
22
|
-
settings['
|
|
23
|
-
|
|
24
|
-
let opts = settings[env] || {},
|
|
15
|
+
let opts = settings['profile'] || {},
|
|
25
16
|
shared = settings['shared'] || {};
|
|
26
17
|
const dipper = new Dipper(opts, shared);
|
|
27
18
|
|
package/bin.js
CHANGED
|
@@ -9,39 +9,23 @@ const generatePackagesJson = require(path.join(__dirname, './.scripts/generate_p
|
|
|
9
9
|
|
|
10
10
|
switch (args[0]) {
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
case 'dev':
|
|
17
|
-
try {
|
|
18
|
-
execSync('npx gulp dev --env development', { stdio: 'inherit', cwd: __dirname });
|
|
19
|
-
} catch (error) {
|
|
20
|
-
console.error('Error ejecutando gulp:', error.message);
|
|
21
|
-
}
|
|
22
|
-
break;
|
|
12
|
+
case 'setup':
|
|
13
|
+
generatePackagesJson();
|
|
14
|
+
break;
|
|
23
15
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
case 'dev':
|
|
17
|
+
try {
|
|
18
|
+
execSync('npx gulp dev --env development', { stdio: 'inherit', cwd: __dirname });
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error('Error executing gulp:', error.message);
|
|
21
|
+
}
|
|
22
|
+
break;
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
case 'build:prod':
|
|
41
|
-
try {
|
|
42
|
-
execSync('npx gulp build --env production', { stdio: 'inherit', cwd: __dirname });
|
|
43
|
-
} catch (error) {
|
|
44
|
-
console.error('Error ejecutando gulp:', error.message);
|
|
45
|
-
}
|
|
46
|
-
break;
|
|
24
|
+
case 'build':
|
|
25
|
+
try {
|
|
26
|
+
execSync('npx gulp build', { stdio: 'inherit', cwd: __dirname });
|
|
27
|
+
} catch (error) {
|
|
28
|
+
console.error('Error executing gulp:', error.message);
|
|
29
|
+
}
|
|
30
|
+
break;
|
|
47
31
|
}
|
package/framework/server.js
CHANGED
package/gulpfile.js
CHANGED
|
@@ -13,13 +13,6 @@ const del = require('del');
|
|
|
13
13
|
const gulpif = require('gulp-if');
|
|
14
14
|
const minimist = require('minimist');
|
|
15
15
|
|
|
16
|
-
// Parse command line arguments
|
|
17
|
-
const knownOptions = {
|
|
18
|
-
string: 'env',
|
|
19
|
-
default: { env: process.env.NODE_ENV || 'development' }
|
|
20
|
-
};
|
|
21
|
-
const options = minimist(process.argv.slice(2), knownOptions);
|
|
22
|
-
|
|
23
16
|
// Helper functions
|
|
24
17
|
function getCwd() {
|
|
25
18
|
return process.cwd()
|
|
@@ -120,7 +113,7 @@ function compressCss() {
|
|
|
120
113
|
// Template compilation
|
|
121
114
|
function compileTemplates() {
|
|
122
115
|
return gulp.src('.')
|
|
123
|
-
.pipe(shell([`node .grunt/compile_html.js
|
|
116
|
+
.pipe(shell([`node .grunt/compile_html.js`]));
|
|
124
117
|
}
|
|
125
118
|
|
|
126
119
|
// Watch task
|