Skip to content

Commit d6d1dc5

Browse files
authored
Merge pull request #132 from ahmadayubi/restructure
Restructures src directory and implements RollUpJS
2 parents 2ec5757 + 76bc0c0 commit d6d1dc5

21 files changed

+4732
-4654
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ dist: bionic
66
install:
77
- npm install
88
- npm install -g grunt-cli
9-
- grunt clean copy
9+
- grunt clean copy rollup
1010
script:
1111
- npm test

Gruntfile.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,16 @@ module.exports = function(grunt) {
137137
},
138138
clean: {
139139
dist: ['dist']
140-
}
140+
},
141+
rollup: {
142+
options: {
143+
format: 'iife',
144+
},
145+
main: {
146+
dest: 'dist/mapml.js',
147+
src: 'src/mapml/index.js', // Only one source file is permitted
148+
},
149+
},
141150
});
142151

143152
/*grunt.loadNpmTasks('grunt-html');*/
@@ -147,12 +156,14 @@ module.exports = function(grunt) {
147156
grunt.loadNpmTasks('grunt-contrib-concat');
148157
grunt.loadNpmTasks('grunt-contrib-copy');
149158
grunt.loadNpmTasks('grunt-contrib-clean');
159+
grunt.loadNpmTasks('grunt-rollup');
150160

151161
/* grunt.loadNpmTasks('grunt-processhtml'); */
152162

153163

154164
grunt.registerTask('test', ['jshint']);
155165

156-
grunt.registerTask('default', ['clean:dist', 'copy', 'jshint', 'concat', 'uglify']);
166+
grunt.registerTask('default', ['clean:dist', 'copy', 'jshint', 'concat', 'uglify', 'rollup']);
167+
grunt.registerTask('build', ['rollup']);
157168

158169
};

package-lock.json

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@
4646
"grunt-contrib-uglify-es": "~3.3.0",
4747
"grunt-contrib-watch": "~1.1.0",
4848
"grunt-html": "~9.3.0",
49+
"grunt-rollup": "^11.3.0",
4950
"jest": "^26.1.0",
5051
"jest-playwright-preset": "^0.1.3",
5152
"leaflet": "~1.6.0",
5253
"path": "^0.12.7",
5354
"playwright": "^1.2.1",
5455
"proj4": "2.6.0",
55-
"proj4leaflet": "1.0.1"
56+
"proj4leaflet": "1.0.1",
57+
"rollup": "^2.23.1"
5658
}
5759
}

0 commit comments

Comments
 (0)