![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
A TypeScript 2.0 starter kit using all the latest technology, included the latest available TypeScript version - version 2.0 Pre (nightly build).
If this boilerplate are too complex,a and you need a super fast, and lightweight TypeScript boilerplate that export a single file, click here.
The only development dependency of this project is Node.js. So just make sure you have it installed. Then type few commands known to every Node developer...
git clone --depth 1 https://github.com/kflash/sikky.git
cd sikky
# install the project's dependencies
npm install
# dev build
npm run build:dev
# prod build
npm run build:prod
... and boom! You have it all setup for you!
npm start
- runs a web server on localhost:3000 and updates on changes using HMRnpm run build
- transpile down to ES5 and builds a bundle both for development and productionnpm run build:dev
- transpile down to ES5 and builds a bundle for developmentnpm run build:prod
- transpile down to ES5 and builds a bundle for productionnpm run build:finale
- transpile down to ES5 and builds a bundle for production with Rollup and Bublé
npm run build:finale:prod
- transpile down to ES5 and builds a bundle for production with Rollup and Bublé
npm run build:finale:prod
- transpile down to ES5 and builds a bundle for production with Rollup and Bublé
npm run debug
- debug task used with the VSCode editor
.npm run cleanup
- remove the dist, coverage and build foldersnpm run remove:build
- remove the build foldernpm run remove:dist
- removed the dist foldernpm run lint
- validates everythingnpm run lint:src
- validates all source filesnpm run lint:tests
- validates all test filesnpm run test
- run tests both for browser and the node.js environment
npm run test:browser
- run all unit tests in the browsernpm run test:node
- run all unit tests in the node.js environment
npm run watch:browser
- run all unit tests and watch files for changes in the browser.npm run watch:build
- watch your TypeScript files and trigger recompilation on changes.npm run watch:node
- run all unit tests and watch files for changes in the node.js
environment.npm run tdd
- run all watch tasks in parallel and watch files for changes.update:dependencies
- update npm packagesEverything is done with Webpack
. When you are satisfied and ready to ship the code to production, you can make a nice, clean output with Rollup
.
npm run build:finale
bundle the finale build
files with Rollup, and make them ready for shipping. This files are put inside it's own folder dist-finale
.
A finale
build shaves off around 4 - 5 KB from the bundled source, compared to Webpack
. Less bytes - more happy customers!!
This workflow is tightly integrated with VSCode
. In fact you can do everything from the editor.
Start the VSCode editor, and press Ctrl+Shift+B to compile the project. A build folder appers with the transpiled files in it.
To stop the compilation, press Ctrl+P → > Tasks: Terminate Running Task.
If you want to debug the source code, set a breakpoint on line 6 in /test/browser-tests/sikky.browser.js. Then press Cmd + D to view debugging options.
Select Debug Current TypeScript Test
from the dropdown and press F5 to launch the debugger.
You should hit the breakpoint. Now you can press F11 to step into function, or press Shift+F5 to stop the debugger.
Note! Debugging may randomly return warning on build. See.
Unit tests can be run by pressin Cmd + T. You should see results displayed in the Output window.
Both browser and server tests are set up to run at the same time in parallel.
When including 3rd party modules you also need to include the type definition for the module if they don't provide one within the module.
From TypeScript 2.0 both TDD
and Typings
are deprecated. All definitions are now installed through NPM packages
.
npm install @types/<package name>`.
You can read more about it here
There exist one task for this - npm run tdd
. This task runs all watch task in parallel.
It's integrated a watch task for server and unit testing, and a task to keep an eye on your build process. This is tightly integrated with the
debugger task included in the VSCode editor
.
npm run watch:build
starts the TypeScript 2.0
compiler in watch mode, and watch input files and trigger recompilation on changes. Dead code elimination for ES6 modules are activated by default, so later on you can use either
Webpack 2.0
(early beta stage) or Rollup
to perform tree shaking.
The watch task inform you if something is wrong with your code, and can come up with suggestions on how to solve current issue.
7:28:24 PM - File change detected. Starting incremental compilation...
src/universal/foo.ts(7,10): error TS2348: Value of type 'typeof TeaSpoon' is not callable.
Did you mean to include 'new'?
Travis, Circle and Appveyor are the only supported CI. Travis is setup to work with Linux and OSX. Appveyor only runs in a Windows environment, but are configured to run on both the x86 and x64 platform.
You will need to change permissons on the .sh files used by Travis.
The library is set up to integrate with Coveralls.io
, and are using Istanbul
and Karma + Webpack to generate coverage report.
Coverage report for server tests will be included soon as I find it stable enough.
Browser testing are done with mocha+chai+sinon
. Debugging are enabled by default on port 5858
.
All server related tests are located inside the test/node-tests folder
, and named with a node extension. E.g. foo.node.ts
.
JsDOM
are used to fake DOM on the server.
Note! There is no need to manually import testing framework related packages such as Chai
, Sinon
etc. This have been done automatically.
Browser testing are done with Webpack
together with Karma as the test runner.
All server related tests are located inside the test/browser-tests folder, and named with a node extension. E.g. foo.browser.ts
.
The browser spec runner - ./config/runner.html
- can be opened in a browser to run your tests. For it to work, you must
first run npm run browser
, and open port 8080
in your browser.
This will set up a watch task that will automatically refresh the tests when your scripts, or the tests, change.
This boilerplate is tested against Travis CI
configured to run Android
with SDK version android-19 - 23
.
It's not tested with iOS
. But the conlusion is that this works just fine.
This boilerplate uses TSLint
to lint your source. To change the rules, edit the .tslint.json` file in the root directory, respectively.
This library is ideal for libraries that export a single file.
Yes. It will always be up-to-date.
As a rule of thumb, TypeScript
, Bublé
and Babel
works best in IE9
and above.
A thorough analysis of this question can be found here.
FAQs
A ultimate TypeScript 2.0 boilerplate for node and the browser
The npm package sikky receives a total of 1 weekly downloads. As such, sikky popularity was classified as not popular.
We found that sikky 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
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.