npm install @cipscis/scroll-appear
You will need to install Node.js before working on this package.
- Clone the repository using
git clone https://github.com/cipscis/scroll-appear.git.
npm installto install development dependencies.
- Create a
npm startto run the local server and watch CSS and JS files for changes.
This project creates six npm tasks:
npm run watchfirst runs the
buildtask, then watches the relevant directories and reruns the
buildtask if it sees any changes.
npm startruns both the
npm testlints and compiles any TypeScript.
npm run preparefirst removes directories containing compiled files, then lints and compiles any TypeScript. You should never need to run this task manually, the
preparescript runs automatically when npm prepares your package for publishing.
Usually, you will just want to run
.env file contains the following environment variables:
(string 'development' | 'production')
Used by Webpack to determine what optimisations to use and how to generate sourcemaps.
Used by Express to determine which port to use when running a local Node.js server.
.env file you can use for development is:
PROJECT_NAME = "scroll-appear" MODE = "development" PORT = "8080"
This file is intended to differ from environment to environment, so it is ignored by Git.
These dependencies are used when working on the project locally.
Node.js: Runtime environment
npm: Package manager
Gulp: Task runner
gulp-sass: Using the
sasscompiler with Gulp
- gulp-sass: Using the
Express: Running a Node.js server, accessed at
Concurrently: Running server and development build tasks concurrently
eslint: Linting TypeScript files
These dependencies are used for deploying the project to GitHub Pages.