# create-dev-env

> Cli for starting a new development environment

Latest version **0.1.3** (published 2019-02-25) · 0 weekly downloads

## Install

```sh
npm install create-dev-env
pnpm add create-dev-env
yarn add create-dev-env
bun add create-dev-env
```

Provides the command `create-dev-env`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-02-25 |
| First published | 2019-02-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 32.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anthony White |
| Maintainers | anthonywhite |

## Links

- npm: https://www.npmjs.com/package/create-dev-env
- npm.io page: https://npm.io/package/create-dev-env

## Dependencies (9)

- [nps](https://npm.io/package/nps.md) ^5.9.3
- [dotenv](https://npm.io/package/dotenv.md) ^6.2.0
- [nodemon](https://npm.io/package/nodemon.md) ^1.18.10
- [inquirer](https://npm.io/package/inquirer.md) ^6.2.2
- [cross-env](https://npm.io/package/cross-env.md) ^5.2.0
- [nps-utils](https://npm.io/package/nps-utils.md) ^1.7.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.3.0
- [cli-spinner](https://npm.io/package/cli-spinner.md) ^0.2.8
- [download-git-repo](https://npm.io/package/download-git-repo.md) ^1.1.0

## Recent versions

- 0.1.3 (latest) — 2019-02-25
- 0.1.2 — 2019-02-24
- 0.1.1 — 2019-02-23
- 0.1.0 — 2019-02-23

## README

# DevEnvironment

## You can use it for

- Static pages
  - React (optional)
  - Vue (still on development)
- Node.js
  - API
  - Web Server
  - CLI
- Node.js API serving static pages using React (optional)

## Easy Guide

Download by order

- [VSCode]
- [Settings Sync]

In **VSCode**

- Press F1 and go to

  - 'Sync: Advanced Options'
  - 'Download settings from public Gist'

- Press F1 again and go to
  - 'Sync: Download settings'
  - Write this code **`6f8c59082e58b005f1dd38a7236eeeaf`**

**Now just download the boilerplate code you wish to use!**

- Open terminal on the root directory and write:
  - `npm install`
- For the instructions write on the terminal:
  - `npm start help`

**It's done!**

You will see a similar file structure to this one depending on the project you choose!
![image](readme.png "Node-React-API file structure")

## Guide

### For a more advanced user

- Make sure you have **EsLint** installed in your Code Editor
- Enable `eslint.autoFixOnSave`
- Change your development port on the `PORT` variable inside `package-scripts.js`

**Note:**
If you have **prettier** installed in your code editor then disable it for **Javascript**

- `"prettier.disableLanguages": ["javascript"]`

### If you want to host your own **MongoDB** server go to the `package-scripts.js` find the line responsible for MongoDB and add the path for your MongoDB

#### After that just run `npm start mongodb`

## Development setup

**Depending on the boilerplate project you choose you will have some or all of these options**

To run any of these commands write `npm start` followed by:

- `help` - See all commands available for current project
- `build` - Build Node or DOM or both projects for production
- `node` - Development mode for Node.js
- `node.build` - Build Node.js project
- `node.build.run` - Build Node.js project and run server
- `node.test` - Mocha test
- `node.test.watch` - Mocha test watcher
- `node.debug` - Debug Node.js project
- `dom` - Development mode for DOM
- `dom.build` - Build DOM project
- `dom.build.run` - Build DOM project and run server
- `eslint` - Run Eslint Fix
- `localTunnel` - Expose localhost port 3000
- `update` - Package interactive updater

Example: `npm start node`

<!-- _For more examples and usage, please refer to the [Wiki][wiki]._ -->

## Usage

You can code normally as you would in any project with some aditions

- Babel
- Imports
  - `import './example.js'` Import a whole file
  - `import exported_data from './example.js'` Import exported objects, functions or primitive values
  - `export default exported_data` Export statement
  - For more info on imports and exports [click here][import-export]
- View Libraries
  - [React.js]
- Stylesheets
  - [SASS]
  - [CSS-Nano]
  - [Autoprefixer]
  - Import the compiled sass file in your JS file like this `import './style.css'`
  - For more info on the sass syntax [click here][sass-guide]
- Formatting and linting
  - [EsLint]
    - Google Config
    - Functional Programming config
    - Prettier config
  - [Prettier]
- Web Server
  - [Express.js]
  - [BrowserSync]
  - [LocalTunnel] for exposing localhost online
- Testing
  - [Mocha]
  - [Expect]
  - [Supertest]
  - [Rewire]
- Utils
  - [Nodemon]
  - [DotEnv]
  - [Chalk]

## Release History

- 1.0.0 :
  - Organized code and added comments for public
  - Added NPS for better npm scripts management

## Meta

[Anthony White] – me@anthonywhite.eu

Distributed under the MIT license. See `LICENSE` for more information.

## Contributing

1. Fork it (<https://github.com/AnthonySLWhite/DevEnvironment/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes (`git commit -am 'Add some fooBar'`)
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

<!-- Markdown link & img dfn's -->

[settings sync]: https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
[vscode]: https://code.visualstudio.com/
[import-export]: https://hackernoon.com/import-export-default-require-commandjs-javascript-nodejs-es6-vs-cheatsheet-different-tutorial-example-5a321738b50f
[react.js]: https://reactjs.org/
[sass]: https://sass-lang.com
[autoprefixer]: https://github.com/postcss/autoprefixer#readme
[css-nano]: https://github.com/cssnano/cssnano
[sass-guide]: https://sass-lang.com/guide
[eslint]: https://eslint.org/
[prettier]: https://prettier.io/
[express.js]: http://expressjs.com/
[browsersync]: https://www.browsersync.io/
[localtunnel]: https://localtunnel.github.io/www/
[mocha]: https://mochajs.org/
[expect]: https://devhints.io/expectjs
[supertest]: https://github.com/visionmedia/supertest#readme
[rewire]: https://github.com/jhnns/rewire
[nodemon]: https://nodemon.io/
[dotenv]: https://github.com/motdotla/dotenv#readme
[chalk]: https://github.com/chalk/chalk#readme
[wiki]: https://github.com/yourname/yourproject/wiki
[anthony white]: https://anthonywhite.eu

---
_Source: https://npm.io/package/create-dev-env · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
