- Notifications
You must be signed in to change notification settings - Fork5
Develop, build, deploy, redeploy, and teardown frontend projects fast.
License
reblim/fast
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
With so many frontend technologies available nowadays, sometimes it may feel a bit cumbersome to get started with a project.
Fast aims to alleviate this by providing a simple, yet powerful boilerplate, to get you started with any frontend project.
With Fast, you candevelop
,build
,deploy
,redeploy
, andteardown
frontend projects fast,really fast ⚡️.
To get fast,clone ordownload the repository.
UsingFast is super simple. Simplyopen the Fast folder
using your favorite code editor and install the necessary dependencies.
Note:Fast usesYarn for fast, reliable, and secure dependency management but feel free to useNPM if you prefer.
Replace all instances of$npm_execpath
in thepackage.json file with:
%npm_execpath%
Using Yarn:
yarn
or
yarn install
Using NPM:
npm install
That's it! Now you are ready to start developing your awesome project 😎
To start developing, run:
Using Yarn:
yarn start
or
yarn serve
Using NPM:
npm run start
or
npm run serve
Thestart
script will start the server using the default port3000
. However, you will have to manually open your default browser onhttp://localhost:3000/
.
Theserve
script will start the server and open your default browser onhttp://localhost:3000/
.
Note:If you would like to run the server on a different port, simply update the port3000
provided in the start script to the port of your preference.
If you would like tobuild
the project to use your own deployment pipeline, you can run the build command:
Using Yarn:
yarn build
Using NPM:
npm run build
Deploying your project couldn't be easier! Thanks toSurge, you can deploy your entire project to your custom domain, or to a freesurge.sh
sub-domain e.g.your-awesome-project.surge.sh
.
Note:To deploy to a custom domain, readSurge's documentation.
To deploy your project, run:Using Yarn:
yarn deploy
Using NPM:
npm run deploy
...and follow the command-line instructions. It's that easy!
If you made further changes and need to redeploy your project, simply runyarn redeploy
providing the deployment URL as the last argument to the command, like so:
Using Yarn:
yarn redeploy your-awesome-project.surge.sh
or(if using a custom domain)
yarn redeploy your-custom-domain.com
Using NPM:
npm run redeploy your-awesome-project.surge.sh
or(if using a custom domain)
npm run redeploy your-custom-domain.com
There is a time when all projects must come to an end.
To tear down your project, run:
Using Yarn:
yarn teardown your-awesome-project.surge.sh
or(if using a custom domain)
yarn teardown your-custom-domain.com
Using NPM:
npm run teardown your-awesome-project.surge.sh
or(if using a custom domain)
npm run teardown your-custom-domain.com
Surge also allows you toadd a custom 404 – Not Found page.
You can override Surge’s default 404 – Not Found page with your own, completely custom one bysimply adding a 404.html file in the root of your project.
At the core,Fast usesParcel,Surge,Normalize.css,Sass, andBabel.
Fast usesParcel for Blazing fast bundle times.Parcel uses worker processes to enable multicore compilation and has a filesystem cache for fast rebuilds even after a restart.Parcel usesAutoprefixer, aPostCSS plugin to parse CSS and add vendor prefixes to CSS rules using values from Can I Use. It is recommended by Google and used in Twitter and Alibaba. This allows you to write your CSS rules without vendor prefixes.
Note: If your project needs to support older browsers, simply update thebrowserslist
declaration in thepackage.json file to your desired configuration, and bothBabel andPostCSS'sAutoprefixer will update to provide the necessary transformations throughParcel.
Fast usesSurge for fast and simple, static web publishing through a single command.Surge allows you to deploy, update deploys (redeploy), and teardown your frontend projects in just a few seconds using default or custom domains for free.
Normalize.css makes browsers render all elements more consistently and in line with modern standards. It precisely targets only the styles that need normalizing.
Fast uses Node-sass, a library that provides binding for Node.js to LibSass, the C version of the popular stylesheet preprocessor,Sass. It allows you to natively compile.scss
files to CSS at incredible speed and automatically via a connect middleware.
Fast usesBabel with@babel/preset-env throughParcel's default configuration, which is triggered based on thebrowserslist
declaration in thepackage.json file.@babel/preset-env is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, browser polyfills) are needed by your target environment(s). This both makes your life easier and JavaScript bundles smaller!
Read the Contributing Guidelines.
Thank you toall our contributors.
Copyright (c) 2020 Milber Ferreira
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.