Skip to content

Commit 49c9cf4

Browse files
authored
Merge pull request #4 from aukaio/theodorbadescu/ch17468/make-settle-acceptance-js-self-contained
Self contain library in a single build file
2 parents d079872 + 4a11257 commit 49c9cf4

18 files changed

Lines changed: 1010 additions & 941 deletions

.jshintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"node": true,
1313
"sub": true,
1414
"undef": true,
15+
"esversion": 6,
1516
"globals": {
1617
"it": false,
1718
"xit": false,

Gruntfile.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module.exports = function (grunt) {
6262
stripBanners: true,
6363
process: function (src, filepath) {
6464
return src.replace(/^[^]*var exports\s*=\s*{\s*}\s*;([^]+)return exports;[^]+$/m, '$1');
65-
},
65+
}
6666
},
6767
},
6868
uglify: {
@@ -73,6 +73,19 @@ module.exports = function (grunt) {
7373
src: 'dist/<%= pkg.name %>.js',
7474
dest: 'dist/<%= pkg.name %>.min.js'
7575
}
76+
},
77+
inlineImport: {
78+
options: {
79+
extensions: {
80+
".css": "utf8",
81+
".png": "base64",
82+
".woff": "base64"
83+
},
84+
useVar: true
85+
},
86+
task: {
87+
src: "dist/settle.acceptance.js"
88+
}
7689
}
7790
});
7891

@@ -82,9 +95,10 @@ module.exports = function (grunt) {
8295
grunt.loadNpmTasks('grunt-contrib-jasmine');
8396
grunt.loadNpmTasks('grunt-contrib-jshint');
8497
grunt.loadNpmTasks('grunt-contrib-connect');
98+
grunt.loadNpmTasks("grunt-inline-import");
8599

86-
grunt.registerTask('minify', ['jshint', 'concat', 'uglify']);
87-
grunt.registerTask('test', ['minify', 'connect', 'jasmine']);
88-
89-
grunt.registerTask('default', ['test']);
100+
grunt.registerTask('minify', ['concat']);
101+
grunt.registerTask('test', ['minify', 'connect', 'inlineImport', 'jasmine']);
102+
grunt.registerTask('build', ['minify', 'connect', 'inlineImport', 'uglify', 'jasmine']);
103+
grunt.registerTask('default', ['build']);
90104
};
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
@font-face {
2-
font-family: 'GTEestiProDisplay Regular';
3-
src: url('../fonts/GT-Eesti-Pro-Display-Regular.woff') format('woff');
4-
font-style: normal;
5-
font-weight: 200;
6-
}
7-
81
.paywithsettle,
92
.paywithsettle:visited {
103
-webkit-border-radius: 4px;

assets/css/qr.css

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

0 commit comments

Comments
 (0)