template-lib
Version:
Scaffold a Javascript library
47 lines (46 loc) • 1.51 kB
JSON
{
"name": "<%= name %>",
"version": "1.0.0",
"description": "<%= description %>",
"license": "MIT",
"repository": {
"url": "https://github.com/<%= username %>/<%= name %>",
"type": "git"
},
"homepage": "https://github.com/<%= username %>/<%= name %>",
"bugs": "https://github.com/<%= username %>/<%= name %>",
"main": <% if (compile) { %>"dist/<%= name %>.js"<% } else { %>"index.js"<% } %>,
<% if (compile) { %>"browser": "dist/<%= name %>.js",
"module": "dist/<%= name %>.es.js", <% } %> <% if (cli) { %>
"bin": "cli.js", <% } %>
"files": [
<% if (compile) { %>"dist"<% } else { %>"index.js"<% } %><% if (cli) { %>,
"cli.js"<% } %>
],
"scripts": {
"test": "<% if (unitTest) { %>jest<% } else { %>echo 'no tests'<% } %>",
"format": "prettier-standard <% if (compile) { %>'src/**/*.js'<% } else { %>index.js<% } %>",<% if (compile) { %>
"build": "bili --format es --format umd --compress",<% } %>
"start": "npm run test",
"precommit": "npm test",<% if (compile) { %>
"prepublish": "npm run build",<% } %>
"pretest": "npm run format"
},
"author": "<%= username %> <<%= email %>>",
<%_ if (compile) { -%>
"babel": {
"presets": [
["env"]
]
},
<%_ } -%>
"devDependencies": {<% if (unitTest) { %>
"jest": "~21.2.1",<% } %>
"husky": "~0.14.3", <% if (compile) { %>
<%_ if (unitTest) { -%>
"babel-preset-env": "~1.6.1",
<%_ } -%>
"bili": "~0.18.1",<% } %>
"prettier-standard": "~7.0.3"
}
}