npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nativescript-emulator-reload

v1.2.0

Published

This small gulp script will monitor the source files of a NativeScript project and when a file is changed it'll rebuild and reload the emulator.

Downloads

8

Readme

nativescript-emulator-reload

This small gulp script will monitor the source files of a NativeScript project and when a file is changed it'll rebuild and reload the emulator. Will also use Babel to compile your ES6+ JS into ES5 if you want it to.

Currently only supports iOS emulators.

Install

Either download from Github:

Download the package.json and gulpfile.js and put in the root directory of your app. Then run

npm install

Or install from NPM:

cd /your/project/root
npm install nativescript-emulator-reload
mv node_modules/nativescript-emulator-reload/* .
rm -rf node_modules/nativescript-emulator-reload
npm install

Run

gulp

or with a device flag:

gulp -d iPad-Retina

list valid devices with gulp help

ECMAScript 6 version.

If you want to use ECMAScript 6 there's an gulpfile (gulpfile.es6.js) which will use Babel to turn your ES6+ code into ES5 code.

To use this file, rename gulpfile.js to gulpfile.es5.js (or really to anything) and rename gulpfile.es6.js to gulpfile.js.

gulp watch

The ES6 Gulpscript is opinionated

You most probably need to edit the settings in the gulpfile.

The default settings assumes the following file structure:

/app
	/src
		/shared
		/test
		/views	
	/tns_modules
	/App_Resources
	/...			

Where the content of src will be moved to /app when compiled. Creating a file structure like:

/app
	/src
		/shared
		/test
		/views	
	/tns_modules
	/App_Resources
	/...
	/shared
	/test
	/views		

Where the app/{shared,test,views} are the compiled version of app/src/{shared,test,views}. This way only the ES6 files will be compiled (and not things like tns_modules, anything in node_modules if you install npm packages, etc.)

Testing with Mocha

Mocha is included for your testing pleasures.

Place your tests in /src/test and run them with gulp test

Linting with eslint

eslint is included for your linting pleasures.

Lint the code in your app/src folder by running gulp lint.

If you're using ES6 you most probably want these settings in your .eslintrc in the root directory of your project. es6: true will enable all ES6 features but modules which is enabled by "ecmaFeatures": { modules: true }. Read more about configuring eslint.

{
    "env": {
    	"es6": true
    },
    "ecmaFeatures": { 
        modules: true 
    }
}