Skip to content

Instantly share code, notes, and snippets.

@tomma5o
Created August 27, 2018 07:49
Show Gist options
  • Save tomma5o/9fdcbc93c5b8053cd2cb795d33c03a7c to your computer and use it in GitHub Desktop.
Save tomma5o/9fdcbc93c5b8053cd2cb795d33c03a7c to your computer and use it in GitHub Desktop.
Bash Script for initzialize js project in the folder where the command is executed
# !usr/bin/bash
echo "inizializing js project in $(pwd)\n\n"
git init -q
npm init -y -s
mkdir dist
mkdir src
mkdir src/utils
touch src/index.js
mkdir webpack
touch webpack/prod.configuration.js
touch webpack/dev.configuration.js
touch .gitignore
echo "node_modules/\ndist/\n.env" >> .gitignore
# File for github
touch README.md
touch CHANGELOG.md
# File for environment variables
touch .env
# Setting up Babel
npm install -D babel-cli babel-preset-env
touch .babelrc
echo "{ \"presets\": [\"env\"] }" >> .babelrc
# Setting up Gulp
npm i -D gulp
echo "var gulp = require('gulp');" >> gulpfile.js
$1 .
echo "\n\nDone 🤘"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment