![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
A webpack starter kit to get you up and running with the newest front-end technologies.
A starter kit to get you up and running with a bunch of awesome new front-end technologies using Babel, Webpack, Mocha, Sinon-chai, Rewire, Karma, Coveralls, and ESLint without any framework dependencies.
Just clone the repo and install the necessary node modules:
$ git clone https://github.com/kflash/trolly.git trolly
$ cd trolly
$ npm install # Install Node modules listed in ./package.json
$ npm webpack # Build a non-minified version of the library
npm run build
- Build task that generate a minified and a non-minified scriptnpm run build:dev
- Build task that generate a development bundlenpm run build:prod
- Build task that generate a production bundlenpm run clean
- Remove the dist
folder and it's filesnpm run eslint:source
- Lint the sourcenpm run eslint:test
- Lint the unit testsnpm run eslint:fix
- ESLint will try to fix as many issues as possible in your source filesnpm run clean
- Remove the coverage report and the dist foldernpm run test
- Runs unit tests for both server and the browsernpm run test:browser
- Runs the unit tests for browser / clientnpm run test:server
- Runs the unit tests on the servernpm run watch:server
- Run all unit tests for server & watch files for changesnpm run watch:browser
- Run all unit tests for browser & watch files for changesnpm run karma:firefox
- Run all unit tests with Karma & Firefoxnpm run karma:chrome
- Run all unit tests with Karma & Chromenpm run karma:ie
- Output unit tests with Karma & Internet Explorernpm run cov:server
- Print coverage report for server testsnpm run cov:browser
- Output coverage report for browser testsnpm run cov:chrome
- Output coverage report for browsers tests ( Chrome)npm run packages
- List installed packagesnpm run package:purge
- Remove all dependenciesnpm run package:reinstall
- Reinstall all dependenciesnpm run package:check
- shows a list over dependencies with a higher version number then the current one - if anynpm run package:upgrade
- Automatically upgrade all devDependencies & dependencies, and update package.jsonnpm run package:dev
- Automatically upgrade all devDependencies and update package.jsonnpm run package:prod
- Automatically upgrade all dependencies and update package.jsonnpm run asset-server
- starts a asset server with hot module replacement (WDS) on port 8080This project uses Mocha to run your unit tests, it uses Karma as the test runner, it enables the feature that you are able to render your tests to the browser (e.g: Firefox, Chrome etc.).
To add a unit test, simply create .common.js
file inside the ~/test
folder. Karma will pick up on these files automatically, and Mocha and Chai will be available within your unit tests without the need to import them.
To run unit tests only for the browser ( client), simply create a .client.js
file, or if you need to run unit tests only for the server, create a .server.js
file inside the ~/test
folder.
Tests for both client and server share the same .common.js
files,
To run the tests in the project, just simply npm run test
for both server and client unit tests, or npm run test:server
. for server or npm run test:browser
. for browser tests.
To keep watching the common test suites that you are working on, simply do npm run watch:browser
or npm run watch:server
.
Rewire is supported through the babel-plugin-rewire
plugin. It is useful for writing tests, specifically to mock the dependencies of the module under test.
Examples and tests are included.
Sinon.JS is also set up for test doubles - see test/BatClass.common.js for examples of both Sinon and Rewire using ES6 classes.
Only syntax parsing are supported. If you want to transform JSX you need to add a JSX transformer plugins for it. E.g babel-plugin-transform-react-jsx
for React support.
Both parsing and transformation of Flow comments are supported by this boilerplate.
This library is set up to integrate with Coveralls, and will automatically publish your coverage report if you have created an account for your repo at coveralls.io. Coverage reports are supported for both the browser and server unit tests.
Trolly has build-in some nice features to always make sure your dependency tree are up to date.
To check for the latest dependencies, simply run npm run package:check
.
If you want to update your packages, you can simply do npm run package:upgrade
.
Note! Your package.json
will be automatically updated so make sure you have saved your changes before running this.
To reinstall all packages, do npm run package:reinstall
, and to remove all packages npm run package:purge
.
This boilerplate uses a pre-commit hook to ensure that your npm test (or other specified scripts) passes before you can commit your changes. This all conveniently configured in your package.json.
This boilerplate project uses ESLint and the Airbnb styleguide to lint your source. To change the rules, edit the .eslintrc file in the root directory, respectively.
Trolly uses webpack-dev-server
as an asset server with hot module replacement (WDS) enabled on port 8080.
npm run asset-server
Open http://localhost:8080
, and you will see this message in your browser: It works!
.
Download the package, and run this from the command line:
npm install
This boilerplate is easily customizable. Add your dependencies to the package.json file, and modify either the webpack config files or the karma files itself.
For the server side unit tests with mocha, you may want to install jsdom etc. This can be done if you modify the mocha.conf.js
file located inside the config folder
.
All paths, and the name on the library can be modified inside the config.js
file.
There are a know issue with Node 4.1
on Mac & iOS. To solve this issue, upgrade to Node >= 5.x
.
Yes, for small applications. For a larger project, you'll need to customize the boilerplate after your own needs, but that is out of scope of this boilerplate.
This transpiler works best in IE9+, but you can support IE8 by limiting yourself to a subset of ES2015 features.
To get it working with React, you have to add the babel-preset-react
, react 14.x
and the react-dom 14.x
dependencies to your package.json
. After that you have to add react
to the presets section inside your babelrc
file. Note that you would need to import the React library in your unit tests to get JSX
working.`
Short answer. Too keep the file size as compact as possible. Each plugin take up tons of code lines. Example if you merge the development configuration file with the server configuration file, you will end up with a development version with a filesize 5 - 6 times bigger then what's needed. And everything getting slow.
With Trolly you are given a various set of tools and settings to use. After that it's up to you how you want to use it to setup your own workflow.
All configuration files are located in the ./config
folder.
Yes, there is. You have to configure this yourself. Just modify the environment.js
file inside the ./config folder
.
There exist one example on how to use environment variables. Take a look at the webpack.config.js
file in the root.
Sorry, but this is out of the scope of this boilerplate. However, you should get it to work if you modify your travis.yml
file and add:
before_install:
# GUI for real browsers.
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
Then you would need to modify the karma.conf.js
configuration file, and add a custom launcher:
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
}
before you use ENV vars on Travis, and set the Chrome_travis_ci
as the default browser to launch together with Travis.
If you see any bugs, or have any ideas regarding how to improve this boilerplate,, please do not hesitate to send a pull request.
MIT © KFlash
FAQs
A webpack starter kit to get you up and running with the newest front-end technologies.
The npm package trolly receives a total of 34 weekly downloads. As such, trolly popularity was classified as not popular.
We found that trolly demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.