Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the npm package size #6105

Merged
merged 4 commits into from Mar 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 0 additions & 13 deletions .npmignore

This file was deleted.

4 changes: 2 additions & 2 deletions karma.conf.js
Expand Up @@ -49,12 +49,12 @@ module.exports = function(karma) {
{pattern: 'test/fixtures/**/*.png', included: false},
'node_modules/moment/min/moment.min.js',
'test/index.js',
'src/chart.js'
'src/index.js'
].concat(args.inputs),

preprocessors: {
'test/index.js': ['rollup'],
'src/chart.js': ['sources']
'src/index.js': ['sources']
},

rollupPreprocessor: {
Expand Down
6 changes: 6 additions & 0 deletions package.json
Expand Up @@ -22,6 +22,12 @@
"bugs": {
"url": "https://github.com/chartjs/Chart.js/issues"
},
"files": [
"bower.json",
"composer.json",
"dist/*.css",
"dist/*.js"
],
"devDependencies": {
"clean-css": "^4.2.1",
"coveralls": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Expand Up @@ -7,7 +7,7 @@ const optional = require('./rollup.plugins').optional;
const stylesheet = require('./rollup.plugins').stylesheet;
const pkg = require('./package.json');

const input = 'src/chart.js';
const input = 'src/index.js';
const banner = `/*!
* Chart.js v${pkg.version}
* ${pkg.homepage}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/scales/scale.category.js
Expand Up @@ -130,5 +130,5 @@ module.exports = Scale.extend({
}
});

// INTERNAL: static default options, registered in src/chart.js
// INTERNAL: static default options, registered in src/index.js
module.exports._defaults = defaultConfig;
2 changes: 1 addition & 1 deletion src/scales/scale.linear.js
Expand Up @@ -186,5 +186,5 @@ module.exports = LinearScaleBase.extend({
}
});

// INTERNAL: static default options, registered in src/chart.js
// INTERNAL: static default options, registered in src/index.js
module.exports._defaults = defaultConfig;
2 changes: 1 addition & 1 deletion src/scales/scale.logarithmic.js
Expand Up @@ -345,5 +345,5 @@ module.exports = Scale.extend({
}
});

// INTERNAL: static default options, registered in src/chart.js
// INTERNAL: static default options, registered in src/index.js
module.exports._defaults = defaultConfig;
2 changes: 1 addition & 1 deletion src/scales/scale.radialLinear.js
Expand Up @@ -530,5 +530,5 @@ module.exports = LinearScaleBase.extend({
}
});

// INTERNAL: static default options, registered in src/chart.js
// INTERNAL: static default options, registered in src/index.js
module.exports._defaults = defaultConfig;
2 changes: 1 addition & 1 deletion src/scales/scale.time.js
Expand Up @@ -764,5 +764,5 @@ module.exports = Scale.extend({
}
});

// INTERNAL: static default options, registered in src/chart.js
// INTERNAL: static default options, registered in src/index.js
module.exports._defaults = defaultConfig;