This project is not longer maintained. There is a replacement tool spust which is maintained and easier to use
Create any javascript application with no build configuration using your own or predefined project templates and build plugins.
This project is highly influenced by the Create React App. I thank its authors.
npm install -g create-js-app
create-js-app create my-app
cd my-app/
npm start
This will open your application in a browser (or you can navigate to http://localhost:3000.
When you’re ready to deploy to production, create a minified bundle with npm run build
.
This project is currently under occassional development. This means that if I encounter a bug, or if a new simple feature comes to mind, I will be continuing to work on it.
I am using this project at my work actively with features that are currently available (and these features are all I need for now).
You can create your own plugins or templates easily if there is something you miss.
# using npm
npm install -g create-js-app
# using yarn
yarn global add create-js-app
This command will install create-js-app
globally.
You will need to have Node >= 6.0 on you machine
You have two options of how to create an application. The first one is creating an application using default project template (which is using js-app-plugin-universal-webpack under the hood) and the second is creating an application using a template of your own choosing.
create-js-app create <project-directory-to-create>
This will create a project with default template js-app-template-universal
which is suitable for creating universal React application.
create-js-app create my-app
cd my-app/
create-js-app create <project-directory-to-create> --template <package-name>
This will create a project with a template of your own choosing.
create-js-app create my-app --template js-app-plugin-universal-webpack
cd my-app/
There are only two commands you need during the development: npm run start
and npm run test
.
First you need to develop your application. To start the development mode you need to run following command in a project directory.
npm start
This will start your application. If you are using default project template then it opens the application in your browser.
During development you may need to test your application. In this case use the following command.
npm test
This command will start the jest test runner in watch mode (any change detected in source files will trigger tests).
Test command will detect if process.env.CI
is set, if it is so then it runs tests only once.
By default test
command runs tests in jsdom
environment. If you want to change it to node please use it with the --node
argument like this npm run test -- --node
.
When you are done with development or you have reached a feature set that can be deployed. Just run the following command to get a minified build of your application.
npm run build
This will generate a build
directory which contains everything you need to run your application.
If you are using a custom template and not the js-app-template-universal
please make sure that the build destination is the same. This destination can differ if the template is using some custom plugin.
Congratulations. You are now ready to create your first javascript application.
- Creating your own plugin [TODO]
If this project does not fulfill your needs, you might want to explore alternatives. Some of the more popular ones are: