Boilerplate for personal use, someone might find it useful with Typescript + React + JSPM (plus some gulp helpers as work arounds for buggy conversion between Typescript > Javascript > JSPM, mostly due to the css plugin and module: system
from Typescript)
- Typescript 2.6+
- Boostrap 4
- React 16+ + Router
- Redux + Actions + Persist + Thunk
- Jest
- Lodash
- Bluebird
- JSPM 0.17+
- Open Sans
- Other minor helper modules (see
jspm.dependencies
inpackage.json
) - Gulp for the release / fix task
git clone https://github.com/pocesar/js-typescript-react-jspm.git yourproject
cd yourproject
- Edit package.json and put your project name on it, plus your extra typescript
@types
devDependencies npm install
- Hack around, you should edit your
_index.html
, not yourindex.html
then:npm run vendor:build
to build your vendor separated from your main project (should be done once usually) indist/vendor.js
npm run ts:build
one-time SystemJS todist/app.js
npm run ts:dev
one-time modular SystemJS tolib
npm run ts:watch
for TS watching during dev tolib
npm run build
will make a release out of your sources (actually execute the more "advanced" Gulp task that callsnpm run build:release
)npm run test:build
will build your TS test sourcesnpm test
jest test itnpm run serve
simple serve yourindex.html
, navigate tohttp://127.0.0.1:5000
. To use your own port, usenpm run serve -- --port 3000
npm run sass:build
for SASS build (one time)npm run sass:watch
for SASS watching
- ...
- Profit!
Every module you install using JSPM you need to install using NPM and vice-versa (for tests to work)
MIT