0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Update package.json for publishing to npm

address #2078

- removes private: true flag from package.json
- created .npmignore file and moved all of buildGlob
 file patterns into here, negating all patterns as
 the npmignore file defines what is to be excluded
 and not included.
- gruntfile now uses the inverse of the .npmignore file
 to define what files to include in a release
This commit is contained in:
Harry Wolff 2014-02-21 22:16:07 -05:00
parent 819d82ac9e
commit d7815f4dff
3 changed files with 39 additions and 29 deletions

28
.npmignore Normal file
View file

@ -0,0 +1,28 @@
!**
.build
.dist
docs/**
_site/**
content/images/**
!content/images/README.md
content/themes/**
!content/themes/casper/**
content/apps/**
!content/apps/README.md
node_modules/**
core/test/**
core/client/assets/sass/**
core/server/data/export/exported*
**/*.db*
*.db*
.sass*
.af*
.git*
.groc*
*.iml
config.js
CONTRIBUTING.md
SECURITY.md
.travis.yml
Gemfile*
*.html

View file

@ -15,34 +15,17 @@ var path = require('path'),
// ## Build File Patterns
// a list of files and paterns to process and exclude when running builds & releases
buildGlob = [
'**',
'!docs/**',
'!_site/**',
'!content/images/**',
'content/images/README.md',
'!content/themes/**',
'content/themes/casper/**',
'!content/apps/**',
'content/apps/README.md',
'!node_modules/**',
'!core/test/**',
'!core/client/assets/sass/**',
'!core/server/data/export/exported*',
'!**/*.db*',
'!*.db*',
'!.sass*',
'!.af*',
'!.git*',
'!.groc*',
'!*.iml',
'!config.js',
'!CONTRIBUTING.md',
'!SECURITY.md',
'!.travis.yml',
'!Gemfile*',
'!*.html'
],
// It is taken from the .npmignore file and all patterns are inverted as the .npmignore
// file defines what to ignore, whereas we want to define what to include.
buildGlob = (function () {
/*jslint stupid:true */
return fs.readFileSync('.npmignore', {encoding: 'utf8'}).split('\n').map(function (pattern) {
if (pattern[0] === '!') {
return pattern.substr(1);
}
return '!' + pattern;
});
}()),
// ## Grunt configuration

View file

@ -15,7 +15,6 @@
},
"bugs" : "https://github.com/TryGhost/Ghost/issues",
"contributors": "https://github.com/TryGhost/Ghost/graphs/contributors",
"private" : true,
"licenses" : [
{
"type": "MIT",