opinionated scaffolder for JavaScript projects
REPLACED BY @form8ion/javascript
projectRoot
string (required)projectName
string (required)visibility
string (required)license
string (required)vcs
object (required)description
string (optional)configs
object (optional)overrides
object (optional)registries
object (optional)ciServices
object (optional)applicationTypes
object (optional)unitTestFrameworks
object (required)package.json
npm ls
and ensuring a 0
exit code).travis.yml
using travis-lint,
when Travis is the chosen CIREADME.md
git
and npm
$ npm install @travi/javascript-scaffolder --save-prod
This scaffolder is intended to be used to scaffold the language specific details within the project-scaffolder.
const {dialects, projectTypes} = require('@form8ion/javascript-core');
const {scaffold: scaffoldJavaScript, questionNames} = require('./lib/index.cjs');
(async () => {
const accountName = 'form8ion';
await scaffoldJavaScript({
projectRoot: process.cwd(),
projectName: 'project-name',
visibility: 'Public',
license: 'MIT',
configs: {
eslint: {scope: `@${accountName}`},
remark: `@${accountName}/remark-lint-preset`,
babelPreset: {name: `@${accountName}`, packageName: `@${accountName}/babel-preset`},
commitlint: {name: `@${accountName}`, packageName: `@${accountName}/commitlint-config`}
},
overrides: {npmAccount: accountName},
ciServices: {},
unitTestFrameworks: {},
decisions: {
[questionNames.DIALECT]: dialects.BABEL,
[questionNames.NODE_VERSION_CATEGORY]: 'LTS',
[questionNames.PACKAGE_MANAGER]: 'npm',
[questionNames.PROJECT_TYPE]: projectTypes.PACKAGE,
[questionNames.SHOULD_BE_SCOPED]: true,
[questionNames.SCOPE]: accountName,
[questionNames.AUTHOR_NAME]: 'Your Name',
[questionNames.AUTHOR_EMAIL]: 'you@domain.tld',
[questionNames.AUTHOR_URL]: 'https://your.website.tld',
[questionNames.UNIT_TESTS]: true,
[questionNames.INTEGRATION_TESTS]: true
}
});
})();
projectRoot
string (required)path to the root of the project
projectName
string (required)name of the project (w/o a scope)
visibility
string (required)visibility of the project (Public
or Private
)
license
string (required)vcs
object (required)host
string (required)
VCS hosting serviceowner
string (required)
account name on the host service for the repositoryname
string (required)
repository namedescription
string (optional)short summary of the project
configs
object (optional)eslint
: object (optional)
details about the shareable config
to be used for the project
packageName
string (required)
name of the npm
packageprefix
string (required)
name to be used when referring to the config within the .eslintrc
files:warning: while i'm not confident that it is the recommended convention, it
is assumed the defined config has a rules/
directory exposed from the
package with rulesets defined for
es6.js
tests/base.js
tests/mocha.js
commitlint
object (optional)
details about the shareable config
to be used for the project
packageName
string (required)
name of the npm
packagename
string (required)
name to be used when referring to the config within the .commitlintrc.js
filebabelPreset
object (optional)
details about the preset
to be used for the project
packageName
string (required)
name of the npm
packagename
string (required)
shorthand name to be used when referring to the configoverrides
object (optional)npmAccount
string (optional)
the account the package should be published under. used to suggest a
scope. defaults to $ npm whoami
author
object (optional)
details
about the package author
name
string (required) defaults to $npm config get init.author.name
email
string (optional) defaults to $npm config get init.author.email
url
string (optional) defaults to $npm config get init.author.url
registries
object (optional)@
)ciServices
object (optional)scaffolder
: function (required) scaffolds the ci service optionspublic
: boolean (optional) whether this service should be presented
as a public optionprivate
: boolean (optional) whether this service should be presented
as a private optionapplicationTypes
object (optional)scaffolder
function (required) scaffolds the applicationunitTestFrameworks
object (required)frameworks to be passed to the unit-testing scaffolder
$ nvm install
$ npm install
$ npm test