Giter Club home page Giter Club logo

azk-cli-boilerplate's Introduction

REPLACE_PROJECT_NAME

REPLACE_TODO_DESCRIPTION


----- REMOVE THIS AFTER USE -----------

TODO HERE

Replace README vars

To use this commands first replace this all occurences of bellow strings. Use Alt + F3 to make this easier:

  • __MY-CLI-TOOL__ // example: get-images
  • __GITHUB_USER__ // example: azukiapp
  • __PROJECT_DESCRIPTION__ // example: Cli tool to download images
  • __BIN_DEFAULT_DESCRIPTION__ // example: Download images for me
  • __THE_AUTHOR__ // example: [email protected]

Unzip and initialize git

wget https://github.com/azukiapp/azk-cli-boilerplate/archive/master.zip
unzip master.zip
mv azk-cli-boilerplate-master __MY-CLI-TOOL__
rm master.zip
cd __MY-CLI-TOOL__
git init
git add . -A
git commit -m"[Project] Initial version from boilerplate"

Replaces in files/code

Replacing string in code

  • Execute this on your new project folder:
# replace main bin filename
find . -name 'REPLACE_PROJECT_NAME.js' -type f -exec bash -c 'mv "$1" "${1/REPLACE_PROJECT_NAME.js/__MY-CLI-TOOL__.js}"' -- {} \;
git add . -A

# replace other strings inside files
find . -type f -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./lib/*" -exec sed -i 's/REPLACE_PROJECT_GITHUB_URI/https:\/\/github.com\/__GITHUB_USER__\/__MY-CLI-TOOL__/g' {} +
find . -type f -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./lib/*" -exec sed -i 's/REPLACE_PROJECT_NAME/__MY-CLI-TOOL__/g' {} +
find . -type f -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./lib/*" -exec sed -i 's/REPLACE_TODO_DESCRIPTION/__PROJECT_DESCRIPTION__/g' {} +
find . -type f -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./lib/*" -exec sed -i 's/REPLACE_TODO_BIN_DESCRIPTION/__BIN_DEFAULT_DESCRIPTION__/g' {} +
find . -type f -not -path "./node_modules/*" -not -path "./.git/*" -not -path "./lib/*" -exec sed -i 's/REPLACE_TODO_AUTHOR/__THE_AUTHOR__/g' {} +
  • Search all other TODO in code and replace with correct values
  • Update CHANGELOG.md
  • Update LICENSE file

Check if its still working

npm install
npm test
node ./bin/__MY-CLI-TOOL__.js -h

Github

Create __MY-CLI-TOOL__ on Github and include remote

git remote add origin [email protected]:__GITHUB_USER__/__MY-CLI-TOOL__.git
git push origin master -u
  • Now you can delete this section from README ;)

----- (END) REMOVE THIS AFTER USE -----

Install

npm install REPLACE_PROJECT_NAME -g

Run

REPLACE_PROJECT_NAME             # REPLACE_TODO_DESCRIPTION

Test and run locally

npm install
npm test
node ./bin/REPLACE_PROJECT_NAME.js -h

azk-cli-boilerplate's People

Contributors

julio-saito-linx avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.