Skip to content

Commit 33920df

Browse files
committed
fix # export issue
1 parent 06d6a3b commit 33920df

38 files changed

+607
-4693
lines changed

.size-snapshot.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"src/ts/build/csvx.iife.js": {
3+
"bundled": 9914,
4+
"minified": 4062,
5+
"gzipped": 1665
6+
},
7+
"src/ts/build/csvx.js": {
8+
"bundled": 6201,
9+
"minified": 2857,
10+
"gzipped": 1127,
11+
"treeshaked": {
12+
"rollup": {
13+
"code": 22,
14+
"import_statements": 22
15+
},
16+
"webpack": {
17+
"code": 2075
18+
}
19+
}
20+
}
21+
}

CHANGELOG.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,52 @@
1+
Version 0.2.1 (December 12th 2020)
2+
-----------------------------
3+
* Fix declaration file
4+
* Lighter library
5+
* Delete Mouette.js and Wee.js devDependencies
6+
17
Version 0.2.0 (November 17th 2020)
28
-----------------------------
3-
* Added support for array of different objects
9+
* Add support for array of different objects
410

511
Version 0.1.11 (April 10th 2020)
612
-----------------------------
7-
* Fixed csv export with custom labels on Firefox
13+
* Fix csv export with custom labels on Firefox
814

915
Version 0.1.10 (April 10th 2019)
1016
-----------------------------
11-
* Fixed csv export with better filename checking
17+
* Fix csv export with better filename checking
1218

1319
Version 0.1.9 (April 09th 2019)
1420
-----------------------------
15-
* Fixed csv export with special characters
21+
* Fix csv export with special characters
1622

1723
Version 0.1.8 (March 31th 2019)
1824
-----------------------------
19-
* Improved typings
25+
* Improve typings
2026

2127
Version 0.1.7 (March 13th 2019)
2228
-----------------------------
23-
* Added byte order mark U+FEFF at the beginning of the data stream
29+
* Add byte order mark U+FEFF at the beginning of the data stream
2430

2531
Version 0.1.6 (March 01st 2019)
2632
-----------------------------
2733
* Default name to 'export.csv' if filename parameter is empty
2834

2935
Version 0.1.5 (February 11th 2019)
3036
-----------------------------
31-
* Added custom labels option
37+
* Add custom labels option
3238
* array() method of Convert class deletes empty strings
3339

3440
Version 0.1.4 (February 08th 2019)
3541
-----------------------------
36-
* Added Convert class to transform CSV data to array or HTML table
42+
* Add Convert class to transform CSV data to array or HTML table
3743

3844
Version 0.1.3 (December 23th 2018)
3945
-----------------------------
40-
* Added Ch.js dependency
41-
* Updated Mouette.js dependency to version 0.2.8
42-
* Updated Wee.js dependency to version 0.2.1
43-
* Updated README.md
46+
* Add Ch.js dependency
47+
* Update Mouette.js dependency to version 0.2.8
48+
* Update Wee.js dependency to version 0.2.1
49+
* Update README.md
4450

4551
Version 0.1.2 (December 07th 2018)
4652
-----------------------------

Gruntfile.js

Lines changed: 15 additions & 206 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
module.exports = function(grunt){
22
const path = require('path');
3-
const babel = require('rollup-plugin-babel');
4-
const resolve = require('rollup-plugin-node-resolve');
53
const sass = require('node-sass');
64

75
require('time-grunt')(grunt);
@@ -20,7 +18,6 @@ module.exports = function(grunt){
2018
const webDir = 'web/';
2119
const publicDir = webDir + 'public/';
2220
const nodeDir = 'node_modules/';
23-
const docDir = 'doc/';
2421

2522
const banner = '/** MIT License\n' +
2623
'* \n' +
@@ -57,10 +54,6 @@ module.exports = function(grunt){
5754
compiledES6Dir + '*'
5855
]
5956
},
60-
doc:{
61-
src: [ docDir + '*'
62-
]
63-
},
6457
websass:{
6558
src: [ webDir + 'sass/build/*',
6659
publicDir + 'css/*'
@@ -75,16 +68,6 @@ module.exports = function(grunt){
7568
]
7669
}
7770
},
78-
typedoc: {
79-
build: {
80-
options: {
81-
out: docDir,
82-
target: 'es6',
83-
name: projectName + '.js - Documentation'
84-
},
85-
src: [srcDir + 'ts/*.ts']
86-
}
87-
},
8871
// jshint: {
8972
// options: {
9073
// multistr: true
@@ -106,100 +89,6 @@ module.exports = function(grunt){
10689
}]
10790
}
10891
},
109-
csslint: {
110-
dist: {
111-
options: {
112-
import: false
113-
},
114-
src: [webDir + 'sass/build/**/*.css']
115-
}
116-
},
117-
cssmin:{
118-
options: {
119-
shorthandCompacting: false,
120-
roundingPrecision: -1
121-
},
122-
target: {
123-
files: [
124-
{
125-
src: webDir + 'sass/build/grayscale.css',
126-
dest: publicDir + 'css/style.min.css'
127-
}
128-
]
129-
}
130-
},
131-
htmlmin: {
132-
static: {
133-
options: {
134-
removeComments: true,
135-
collapseWhitespace: true
136-
},
137-
expand: true,
138-
cwd: webDir + 'static',
139-
src: ['**/*.htm'],
140-
dest: webDir + 'static/'
141-
}
142-
},
143-
ts: {
144-
es6: {
145-
options: {
146-
fast: 'never'
147-
//rootDir: srcDir + 'ts/'
148-
},
149-
tsconfig: 'tsconfig.json',
150-
src: [ srcDir + 'ts/**/*.ts', '!node_modules/**/*.ts' ]
151-
},
152-
es6dev: {
153-
options: {
154-
// fast: 'always'
155-
//rootDir: srcDir + 'ts/'
156-
},
157-
tsconfig: 'tsconfig-dev.json',
158-
src: [ srcDir + 'ts/**/*.ts', '!node_modules/**/*.ts' ]
159-
},
160-
},
161-
rollup: {
162-
es6:{
163-
options: {
164-
format:'es',
165-
// moduleName: projectName,
166-
banner: banner,
167-
// sourceMap: 'inline'
168-
plugins: [
169-
170-
],
171-
external: [
172-
'@lcluber/weejs',
173-
'@lcluber/mouettejs',
174-
'@lcluber/chjs'
175-
]
176-
},
177-
files: [ {
178-
src : compiledES6Dir + projectNameLC + '.js',
179-
dest : distDir + projectNameLC + '.js'
180-
} ]
181-
},
182-
iife:{
183-
options: {
184-
format:'iife',
185-
moduleName: projectName,
186-
banner: banner,
187-
plugins: [
188-
babel({
189-
// //exclude: './node_modules/**'
190-
}),
191-
resolve({
192-
// //exclude: './node_modules/**'
193-
})
194-
]
195-
// sourceMap: 'inline'
196-
},
197-
files: [ {
198-
src : compiledES6Dir + projectNameLC + '.js',
199-
dest : distDir + projectNameLC + '.iife.js'
200-
} ]
201-
}
202-
},
20392
uglify: {
20493
libIife: {
20594
options: {
@@ -325,6 +214,13 @@ module.exports = function(grunt){
325214
src: ['fonts/**/*'],
326215
dest: publicDir,
327216
filter: 'isFile'
217+
},
218+
css:{
219+
expand: true,
220+
cwd: webDir + 'sass/build/',
221+
src: ['*'],
222+
dest: publicDir + 'css/',
223+
filter: 'isFile'
328224
}
329225
},
330226
nodemon: {
@@ -343,90 +239,38 @@ module.exports = function(grunt){
343239
path: 'http://' + host + ':' + port
344240
}
345241
},
346-
watch: {
347-
lib: {
348-
files: [ srcDir + 'ts/**/*.ts', '!' + srcDir + 'ts/build/**/*'],
349-
tasks: ['lib-dev']
350-
},
351-
webpug:{
352-
files: webDir + 'views/**/*.pug'
353-
},
354-
webjs: {
355-
files: webDir + 'js/**/*.js',
356-
tasks: ['webjs']
357-
},
358-
websass: {
359-
files: [webDir + 'sass/**/*.scss', '!' + webDir + 'sass/build/*'],
360-
tasks: ['websass']
361-
},
362-
options: {
363-
interrupt: true,
364-
spawn: false,
365-
livereload: true,
366-
livereloadOnError:false
367-
}
368-
},
369242
// run watch and nodemon at the same time
370243
concurrent: {
371244
options: {
372245
logConcurrentOutput: true
373246
},
374-
tasks: ['nodemon', 'watch', 'open' ]
247+
tasks: ['nodemon' ]
375248
}
376249
});
377250

378251
grunt.loadNpmTasks( 'grunt-contrib-clean' );
379252
grunt.loadNpmTasks( 'grunt-contrib-copy' );
380-
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
381253
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
382-
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
383-
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
384254
grunt.loadNpmTasks( 'grunt-contrib-concat' );
385-
grunt.loadNpmTasks( 'grunt-contrib-htmlmin' );
386-
grunt.loadNpmTasks( 'grunt-contrib-watch' );
387255
grunt.loadNpmTasks( 'grunt-strip-code' );
388256
grunt.loadNpmTasks( 'grunt-concurrent' );
389257
grunt.loadNpmTasks( 'grunt-nodemon' );
390-
grunt.loadNpmTasks( 'grunt-open' );
391-
grunt.loadNpmTasks( 'grunt-ts' );
392-
grunt.loadNpmTasks( 'grunt-rollup' );
393-
grunt.loadNpmTasks( 'grunt-typedoc' );
394258
grunt.loadNpmTasks( 'grunt-sass' );
395259

396260

397-
grunt.registerTask( 'lib',
261+
grunt.registerTask( 'ugly',
398262
'build the library in the dist/ folder',
399-
[ // 'tslint:lib',
400-
'clean:lib',
401-
//lib es6
402-
'ts:es6',
403-
'rollup:es6',
404-
//lib es5
405-
//'ts:es5',
406-
'rollup:iife',
407-
'uglify:libIife',
408-
//declaration
409-
'concat:declaration',
410-
'strip_code:declaration'
263+
[ 'uglify:libIife'
411264
]
412265
);
413266

414-
grunt.registerTask( 'lib-dev',
267+
grunt.registerTask( 'declaration',
415268
'build the library in the dist/ folder',
416-
[ 'ts:es6dev',
417-
'rollup:es6',
418-
'rollup:iife',
419-
'uglify:libIife'
269+
[ 'concat:declaration',
270+
'strip_code:declaration'
420271
]
421272
);
422273

423-
grunt.registerTask( 'doc',
424-
'Compile lib documentation',
425-
[ 'clean:doc',
426-
'typedoc'
427-
]
428-
);
429-
430274
grunt.registerTask( 'serve',
431275
'launch server, open website and watch for changes',
432276
[ 'concurrent' ]
@@ -436,7 +280,8 @@ module.exports = function(grunt){
436280
'Compile website css',
437281
[ 'clean:websass',
438282
'sass',
439-
'cssmin',
283+
// 'cssmin',
284+
'copy:css',
440285
'concat:webcss'
441286
]
442287
);
@@ -466,40 +311,4 @@ module.exports = function(grunt){
466311
}
467312
);
468313

469-
grunt.registerTask( 'buildprod',
470-
'build for production',
471-
function() {
472-
//build lib
473-
grunt.task.run('lib');
474-
//build site
475-
grunt.task.run('website');
476-
//build documentation
477-
grunt.task.run('doc');
478-
// launch server and watch for changes
479-
grunt.task.run('serve');
480-
}
481-
);
482-
483-
grunt.registerTask( 'build',
484-
'build for developpment',
485-
function() {
486-
//build lib
487-
grunt.task.run('lib-dev');
488-
//build site
489-
grunt.task.run('website');
490-
//build documentation
491-
//grunt.task.run('doc');
492-
// launch server and watch for changes
493-
grunt.task.run('serve');
494-
}
495-
);
496-
497-
grunt.registerTask( 'default',
498-
'build library, website, launch server, open website and watch for changes.',
499-
function() {
500-
// launch server and watch for changes
501-
grunt.task.run('serve');
502-
}
503-
);
504-
505314
};

0 commit comments

Comments
 (0)