vanilla-jet 1.0.29 → 1.0.30
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/.github/workflows/deploy.yml +1 -2
- package/Gruntfile.js +37 -37
- package/package.json +1 -1
package/Gruntfile.js
CHANGED
|
@@ -16,7 +16,7 @@ module.exports = function(grunt) {
|
|
|
16
16
|
require('./.grunt/build_styles_task')(grunt);
|
|
17
17
|
|
|
18
18
|
// -- Functions
|
|
19
|
-
function
|
|
19
|
+
function getCwd() {
|
|
20
20
|
const cwd = process.cwd();
|
|
21
21
|
let newCwd = cwd
|
|
22
22
|
.replace('/node_modules', '')
|
|
@@ -28,19 +28,19 @@ module.exports = function(grunt) {
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
// -- Vars
|
|
31
|
-
const cssDestination = `${
|
|
32
|
-
const cssOrigin = `${
|
|
33
|
-
const jsDestination = `${
|
|
31
|
+
const cssDestination = `${getCwd()}/public/styles/app.min.css`;
|
|
32
|
+
const cssOrigin = `${getCwd()}/assets/styles/less/admin_build.less`;
|
|
33
|
+
const jsDestination = `${getCwd()}/public/`;
|
|
34
34
|
|
|
35
35
|
// -- Init
|
|
36
36
|
grunt.initConfig({
|
|
37
37
|
clean: {
|
|
38
|
-
build: [`${
|
|
38
|
+
build: [`${getCwd()}/public/scripts/vanilla.min.js`],
|
|
39
39
|
minified: [
|
|
40
|
-
`${
|
|
41
|
-
`${
|
|
42
|
-
`${
|
|
43
|
-
`${
|
|
40
|
+
`${getCwd()}/public/scripts/api`,
|
|
41
|
+
`${getCwd()}/public/scripts/controllers`,
|
|
42
|
+
`${getCwd()}/public/scripts/views`,
|
|
43
|
+
`${getCwd()}/public/scripts/app.min.js`
|
|
44
44
|
],
|
|
45
45
|
//minified: ['public/scripts/**/*.min.js', 'public/scripts/*', '!public/scripts/vanilla.min.js']
|
|
46
46
|
},
|
|
@@ -63,10 +63,10 @@ module.exports = function(grunt) {
|
|
|
63
63
|
},
|
|
64
64
|
styles: {
|
|
65
65
|
files: [
|
|
66
|
-
`${
|
|
67
|
-
`${
|
|
68
|
-
`${
|
|
69
|
-
`${
|
|
66
|
+
`${getCwd()}/assets/styles/less/*.less`,
|
|
67
|
+
`${getCwd()}/assets/styles/less/**/*.less`,
|
|
68
|
+
`${getCwd()}/assets/styles/less/**/**/*.less`,
|
|
69
|
+
`${getCwd()}/!assets/styles/less/admin_build.less`
|
|
70
70
|
],
|
|
71
71
|
tasks: ['buildLess'],
|
|
72
72
|
options: {
|
|
@@ -75,22 +75,22 @@ module.exports = function(grunt) {
|
|
|
75
75
|
},
|
|
76
76
|
scripts: {
|
|
77
77
|
files: [
|
|
78
|
-
`${
|
|
79
|
-
`${
|
|
80
|
-
`${
|
|
81
|
-
`${
|
|
82
|
-
`${
|
|
83
|
-
`${
|
|
78
|
+
`${getCwd()}/assets/pages/*.html`,
|
|
79
|
+
`${getCwd()}/assets/templates/**/*.html`,
|
|
80
|
+
`${getCwd()}/assets/templates/**/**/*.html`,
|
|
81
|
+
`${getCwd()}/external/view/*.js`,
|
|
82
|
+
`${getCwd()}/external/*.js`,
|
|
83
|
+
`${getCwd()}/framework/*.js`
|
|
84
84
|
],
|
|
85
85
|
tasks: ['shell:compileTemplates']
|
|
86
86
|
},
|
|
87
87
|
specificScripts: {
|
|
88
88
|
files: [
|
|
89
|
-
`${
|
|
90
|
-
`${
|
|
91
|
-
`${
|
|
89
|
+
`${getCwd()}/assets/scripts/*.js`,
|
|
90
|
+
`${getCwd()}/assets/scripts/**/*.js`,
|
|
91
|
+
`${getCwd()}/assets/scripts/**/**/*.js`
|
|
92
92
|
],
|
|
93
|
-
tasks: ['uglify', '
|
|
93
|
+
tasks: ['uglify', 'cleanForce:build', 'concat', 'cleanForce:minified']
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
uglify: {
|
|
@@ -114,12 +114,12 @@ module.exports = function(grunt) {
|
|
|
114
114
|
files: [{
|
|
115
115
|
expand: true,
|
|
116
116
|
src: [
|
|
117
|
-
`${
|
|
118
|
-
`${
|
|
119
|
-
`${
|
|
120
|
-
`${
|
|
117
|
+
`${getCwd()}/assets/scripts/*.js`,
|
|
118
|
+
`${getCwd()}/assets/scripts/**/*.js`,
|
|
119
|
+
`${getCwd()}/assets/scripts/**/**/*.js`,
|
|
120
|
+
`${getCwd()}/assets/scripts/**/**/**/*.js`
|
|
121
121
|
],
|
|
122
|
-
dest:
|
|
122
|
+
dest: getCwd() + '/public',
|
|
123
123
|
rename : function (dest, src) {
|
|
124
124
|
|
|
125
125
|
var folder = src.substring(0, src.lastIndexOf('/')),
|
|
@@ -137,17 +137,17 @@ module.exports = function(grunt) {
|
|
|
137
137
|
build: {
|
|
138
138
|
src: [
|
|
139
139
|
// Order
|
|
140
|
-
`${
|
|
141
|
-
`${
|
|
142
|
-
`${
|
|
143
|
-
`${
|
|
140
|
+
`${getCwd()}/public/scripts/controllers/**/*.min.js`,
|
|
141
|
+
`${getCwd()}/public/scripts/views/**/*.min.js`,
|
|
142
|
+
`${getCwd()}/public/scripts/api/**/*.min.js`,
|
|
143
|
+
`${getCwd()}/public/scripts/*.min.js`,
|
|
144
144
|
|
|
145
145
|
// Ignore files
|
|
146
|
-
`!${
|
|
147
|
-
`!${
|
|
148
|
-
`!${
|
|
146
|
+
`!${getCwd()}/public/scripts/core/**`,
|
|
147
|
+
`!${getCwd()}/public/scripts/plugins/**`,
|
|
148
|
+
`!${getCwd()}/public/scripts/plugins/ui/**`
|
|
149
149
|
],
|
|
150
|
-
dest: `${
|
|
150
|
+
dest: `${getCwd()}/public/scripts/vanilla.min.js`
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
compress: {
|
|
@@ -157,7 +157,7 @@ module.exports = function(grunt) {
|
|
|
157
157
|
},
|
|
158
158
|
files: [{
|
|
159
159
|
expand: true,
|
|
160
|
-
src: [`${
|
|
160
|
+
src: [`${getCwd()}/public/scripts/vanilla.min.js`],
|
|
161
161
|
dest: '',
|
|
162
162
|
ext: '.min.js.gz'
|
|
163
163
|
}]
|