Comments (13)
while it is probably good to explicitly set the .npm-init.js location, by default, it will look for ~/.npm-init.js
from entente.
~/.npm-init.js
const fs = require('fs');
const content = `{
"extends": "semistandard"
}`
fs.writeFileSync('.eslintrc.json', content);
fs.mkdirSync('test');
module.exports = {
name: prompt('name', basename || package.name),
version: '0.0.1',
description: prompt(s => s),
main: prompt('entry point', 'index.js', ep => fs.writeFileSync(ep, '')),
author: 'Red Hat, Inc.',
license: 'Apache-2.0',
scripts: {
test: 'tape test/*.js | tap-spec',
lint: 'eslint test/*.js index.js',
prepublish: 'nsp check',
coverage: 'istanbul cover tape test/*.js'
},
repository: {
type: 'git',
url: 'git://github.com/USER/' + basename + '.git'
},
files: [
'package.json',
'README.md',
'LICENSE',
'index.js'
],
bugs: {url: 'https://github.com/USER/' + basename + '/issues'},
homepage: 'https://github.com/USER/' + basename,
keywords: prompt(s => s.split(/\s+/)),
devDependencies: {
eslint: '*',
'eslint-config-semistandard': '*',
'eslint-config-standard': '*',
'eslint-plugin-promise': '*',
'eslint-plugin-react': '*',
'eslint-plugin-standard': '*',
istanbul: '*',
nsp: '*',
'tap-spec': '*',
tape: '*'
},
cleanup: function (cb) {
cb(null, undefined);
}
};
run npm init
result:
{
"name": "tempa", <------------ question with default
"version": "0.0.1",
"description": "asdasd", <------------ question
"main": "index.js", <------------ question
"author": "Red Hat, Inc.",
"license": "Apache-2.0",
"scripts": {
"test": "tape test/*.js | tap-spec", <------------- change to best fit
"lint": "eslint test/*.js index.js", <------------- change to best fit
"prepublish": "nsp check",
"coverage": "istanbul cover tape test/*.js" <------------- change to best fit
},
"repository": {
"type": "git",
"url": "git://github.com/USER/tempa.git" <------------ change your USER
},
"files": [ <------------- change to best fit
"package.json",
"README.md",
"LICENSE",
"index.js"
],
"bugs": {
"url": "https://github.com/USER/tempa/issues" <------------ change your USER
},
"homepage": "https://github.com/USER/tempa", <------------ change your USER
"keywords": [ <------------ question
"aa",
"bb",
"cc"
],
"devDependencies": {
"eslint": "^3.3.1",
"eslint-config-semistandard": "^7.0.0-beta.0",
"eslint-config-standard": "^6.0.0",
"eslint-plugin-promise": "^2.0.1",
"eslint-plugin-react": "^6.1.2",
"eslint-plugin-standard": "^2.0.0",
"istanbul": "^0.4.5",
"nsp": "^2.6.1",
"tap-spec": "^4.1.1",
"tape": "^4.5.1"
}
}
from entente.
Landed - thanks!
from entente.
@helio-frota ooooh, i like this
from entente.
+1
On Mon, Sep 19, 2016 at 1:50 PM Lucas Holmquist [email protected]
wrote:
@helio-frota https://github.com/helio-frota ooooh, i like this
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAA-UBiaFXsVczc4Lb7Ea7qDA-rN8Gvtks5qrstUgaJpZM4JytMX
.
from entente.
Thanks for the feedback folks.
But when I use this, I miss 2 things:
creation of ' index.js [ or the specified entry point ]'
creation of ' .eslintrc.json '
- npm init
1.1. Answer the questions - npm install
- touch index.js < ----- can be automatic, empty file
- open the project directory on vscode
so when execute npm run lint
we get this error:
ESLint couldn't find a configuration file.
Maybe is good to create an empty 'test' directory to avoid :
a) 'mkdir test'
b) creation of 'tests' <-- using plural
from entente.
Updated, with this ^
from entente.
Any improvement feel free to update.
from entente.
done ?
Also I'm using this :]
for simple tests I remove "author": "Red Hat, Inc.",
from entente.
@lance Is going to test this with his next OpenShift test project, and then we can find it's final resting place.
from entente.
@helio-frota I have some feedback on some stuff in the file itself. Can you open a PR on this repository with a single file npm-init.js
in the root of the repository so we can discuss?
from entente.
@lance ok!
from entente.
from entente.
Related Issues (20)
- licenser basic screencast HOT 1
- Add circuit breaker booster for Node.js RHOAR HOT 1
- Node.js Runtime Guide for RHOAR HOT 2
- RHOAR Integration HOT 1
- add nodejs-rest-http to greenkeeper HOT 1
- Update nodeshift with new config-loader options HOT 1
- Health Check Middleware HOT 2
- ConfigMap Booster HOT 2
- Node Boosters - Create Launch Templates
- Enable greenkeeper for license-reporter
- feat: Create MEAN booster HOT 1
- To test bucharest-gold projects on windows HOT 3
- Create rhel7-s2i-nodejs repo HOT 2
- Potential New Booster Development for RHOAR and/or OpenShift HOT 5
- search how to configure environment variable that works in cross-platform environment inside package.json -> scripts HOT 1
- try to deploy any of the existing RHOAR Java boosters HOT 5
- script step-to-step for mean nodeshift minishift demo
- 2018-02-27 Team Meeting Agenda
- boosters: Add license-reporter silent option and fixed version of express
- RFC - s2i Builder Image for Front-end Javascript HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from entente.