- 1.2.1Latest
- 1.2.0
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.0.0
- 0.4.1
- 0.4.0
- 0.3.9
- 0.3.8
- 0.3.7
- 0.3.6
- 0.3.5
- 0.3.4
- 0.3.3
- 0.3.1
- 0.3.0
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.28
- 0.0.27
- 0.0.26
- 0.0.25
- 0.0.24
- 0.0.23
- 0.0.22
- 0.0.21
- 0.0.20
- 0.0.19
- 0.0.18
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.11
- 0.0.12
- 0.0.10
- 0.0.9
- 0.0.8
- 0.0.7
- 0.0.6
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- publish
Sculptr
Sculptr is a cli that allows users to build project scaffolding. When a user tells it to build a project, it asks them a set of questions, and based on their answer, it will write the correct project files. For example, if the user answered: Typescript
, then, SCSS
, It will write the code for a project using Typescript as a scripting language, and SCSS as a styling language.
Prerequisites
- Npm
- Github
Installation
$ npm i -g sculptr
Build
Step 1:
- Open the folder you want to build the project in
- Run:
$ sculptr build <platform> <name> [options]
For example
$ sculptr build react my-new-app --typescript
This will make a my-new-app
folder in the current working directory, and initialize the project there. You could also use:
It will then ask:
? Do you want use SCSS, Sass, or CSS? (YOUR_ANSWER)
In this demo, SCSS is selected. It will then output the following
Step 2:
sculptr: Writing files...
sculptr: Files written
sculptr:
sculptr: Making an visual representation of the folder tree...
sculptr: Tree created:
sculptr:
sculptr: βββ LICENSE
sculptr: βββ README.md
sculptr: βββ package.json
sculptr: βββ public
sculptr: | βββ favicon.ico
sculptr: | βββ index.html
sculptr: | βββ logo192.png
sculptr: | βββ logo512.png
sculptr: | βββ manifest.json
sculptr: | βββ robots.txt
sculptr: βββ src
sculptr: | βββ App.tsx
sculptr: | βββ index.tsx
sculptr: | βββ logo.svg
sculptr: | βββ react-app-env.d.ts
sculptr: | βββ style
sculptr: | βββ abstracts
sculptr: | | βββ _mixins.scss
sculptr: | | βββ _utils.scss
sculptr: | | βββ _variables.scss
sculptr: | βββ app.scss
sculptr: | βββ base
sculptr: | | βββ _reset.scss
sculptr: | βββ base.scss
sculptr:
sculptr: Task completed
sculptr: Project Name: 'my-new-app'
sculptr: Username: 'YOUR GITHUB NAME'
sculptr:
sculptr: Built a new project with: React, Typescript, Scss
sculptr:
sculptr: Prewritten scripts (in ./package.json):
sculptr: start: 'react-scripts start',
sculptr: build: 'react-scripts build',
sculptr: test: 'react-scripts test',
sculptr: eject: 'react-scripts eject'
How it works
Username
It gets the Username for the project by running git config --global --get user.name
to get the userβs github name. I chose this to keep the cli and user experience simple, and a lot of people have github.
Project Name
Sculptr gets the project name from the parent folder; ie. if it was building a project in: /Users/<USER>/Desktop/new-project/
it would read new-project
as the project name.
Project Name/Username Usage
Sculptr uses the project name in the package.json file, and the README.md. It uses the Username in the package.json file (author), in the README.md, and the LICENSE file.
Arguments
<platform>
The type of app that sculptr creates (βnextβ, or βreactβ)<name>
The name of the app. Could be a directory or a word, if the value for βnameβ is β.β it uses the parent folderβs name, and initializes in the parent folder
Flags
--skip
This skips installingnode_modules
and doesnβt runnpm i
--typescript
,--ts
This sets the script to typescript--javascript
,--js
This sets the script to javascript--scss
This sets the style to scss--sass
This sets the style to sass--css
This sets the style to css
Add
Adds an asset to the current working directory
Accepted values:
sass
scss
tsconfig
,tsc
, orts
$ sculptr add tsconfig