tacer
v1.0.0
Published
An easier way to create a Javascript project.
Downloads
3
Readme
tacer
Create your own template and hide all bundling details.
Intro
'Tacer' means 'to be silent' in Interlingua. What tacer
does is making bundling process silent or invisible.
If you've used create-react-app
, you must be suprised by its bundling process. You don't need install babel
, webpack
or rollup
mannually. The only thing you should do you run npm start
Now, use tacer
to create your own scaffold. All the bundling configures should be written once and used anywhere. Your project folder becomes simple and clear if webpack.config.js
, rollup.config.js
or jest.config.js
are not in the folder.
How To Use
Install globally
npm install -g tacer
tacer react path/to/project
tacer https://github.com/IdanLoo/tacer-template-react path/to/project
Via npx
npx tacer react path/to/project
npx tacer https://github.com/IdanLoo/tacer-template-react path/to/project
Usage
tacer <template> [path]
template:
required
, a package name or a git repository url.tacer
always assume template is named with prefixtacer-template-
, so it tries to downloadtacer-template-react
if areact
given.There are some out-of-box templates now.
path:
optional
default:
process.cwd()
The path of the new project located.
How To Create Template
Althought I have provided some templates, they may not satisfy you. If you'd like to create one, go ahead.
Let's say we are going to create a template for Electron.
Seed
The template of templates is alse a template whick called tacer-template-seed
. So you can create like this
tacer seed /path/to/tacer-template-electron
Your will see a folder on the given path.
NOTICE: tacer
always assume the package is named with prefix tacer-template-
. So if you want to create an Electron template, you need name it as tacer-template-electron
.
Template
Create a folder named template
in /path/to/tacer-template-electron
and put some things (package.json
, index.js
, .gitignore
, etc.) into it. You can just copy an existing project and rename as template
.
Handle Bundling
You may notice there is a scripts
folder in /path/to/tacer-template-electron
. Each script in this folder exports one function which can be called by tacer-script.
Add "start": "tacer-script start"
and "build": "tacer-script build"
scripts into template/package.json
. You can add other commands as you like which provided in the scripts
folder.
See more details in above templates.
Validate
How could we know if the template works? Add a devDependency to the template.
npm install --save-dev file:..
// or
yarn add -D file:..
So that you can try npm start
, npm build
or other commands provided in the tacer-template-electron