Slider with JavaScript
A brief description of your project, what it is used for. Also add a version badge if possible
To install all project dependencies simply run
npm i
This project includes quite a few opinionated settings which where made according to our own guidelines. Therefore this template includes:
- Webpack as module bundler, dev server and build tool
- Babel for ES6 and Flow transpilation
- Flow as type-checker
- Standard as JS linter
- StyleLint as scss/css linter
- CSS-Autoprefixing via postcss
- Jest as testing framework
- SVG-Sprite for automatic sprite/scss generation
- normalize.css as CSS-reset
To start the development server run:
npm start
This will built the svg-sprite files and start an instance of webpack-dev-server. From then on the whole project will rebuild, run your JS files through the Flow type-checker and lint you JS with standard and you scss/CSS with stylelint.
To separately type-check your JS-files, run:
npm run flow
To add third party library flow support use flow-typed.
If the library of your choice does not support flow, you can add a file
named after the module into the flow-typed
-directory. The file should have
the following content in it:
// myModule.js
declare module 'myModule' {
declare module.exports: any
}
If a local module is not resolve you can add an option to
the .flowconfig
like so:
[options]
module.system.node.resolve_dirname=src
To separately lint your JS-files, run:
npm run lint
or to autmatically fix issues if possible, run:
npm run lint:fix
To separately lint your stylesheets, run:
npm run stylelint
or to automatically fix issues if possible, run:
npm run stylelint:fix
Tests should usually live next to their base files and should
be named like: <myBaseFile>.test.js
.
To run Jest an check if your tests pass invoke:
npm run test
This will also generate a coverage folder, containing information about the projects test coverage.
To continuously run Jest and have Jest watch for changes, run:
npm run test:watch
To build the project, run:
npm run build
This will build your svg-sprite files, compile, minify and bundle everything and put all packaged files into the dist/ directory (if there is no such directory it will just be newly created, an existing directory will be removed first). To allow our clients browsers to cache vendor files and only update the cache when it is really necessary, all important filenames include hashes for reference inside the built manifest file.
This project already includes a default .gitlab-ci.yml. Just confiure the file to your needs.
give instructions on how to build and release a new version In case there's some step you have to take that publishes this project to a server, this is the right time to state it.
packagemanager deploy your-project -s server.com -u username -p password
And again you'd need to tell what the previous code actually does.
We can maybe use SemVer for versioning. For the versions available, see the link to tags on this repository.
Here you should write what are all of the configurations a user can enter when using the project.
Describe and show how to run the tests with code examples. Explain what these tests test and why.
Give an example
Explain your code style and show how to check it.
If the api is external, link to api documentation. If not describe your api including authentication methods as well as explaining all the endpoints with their required parameters.
Explaining what database (and version) has been used. Provide download links. Documents your database design and schemas, relations etc...