Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
require('./styles.less');
# or you can keep up with the latest cool features (branch dev):
$ git clone git@github.com:vigour-io/gaston.git
$ cd gaston
$ git checkout dev
# you can install it globally
$ npm link
Gaston can be used with new or existing projects
$ mkdir my-project
$ cd my-project
$ gaston init
now you have a package.json with gaston default configuration and a git repository you can work on
$ gaston bootstrap
vigour-js/util/inform-transform
exists in the branch you're using for vigour-js"gaston": {
"browserify-transforms": [
{
"path": "vigour-js/util/inform-transform",
"options": {
"global": "false"
}
}
],
}
$ gaston
> launch
Gaston takes care of all your testing needs - if you're using mocha and chai.
You can run tests in the browser, or in the command line, without the need of requiring mocha or chai anywhere.
First, you need to add a test
dir to your project and make it look something like:
- root
- test
- browser # all the tests to be run in the browser (or phantomjs)
- node # all the server-side tests that don't require a browser
- common # tests that need to be run through node and in a browser
any of the sub-directories are optional, depends on what and how you want to test it.
Inside each folder, you can have any structure you want, and every .js file will only need to have the test code itself:
#some-component.js
describe('some component', function(){
it('should do some stuff', function(){
expect(something).to.be.null;
assert.equal(1,2);
});
});
just run gaston test
from the terminal and press l
to launch a browser window.
this will work exactly like running gaston dev
but will include all the mocha and chai stuff you need to run the tests. So you can run two gaston instances, one for developing and one for testing at the same time and be sure that the tests are passing while you add new features or correct bugs. You don't even need to have the tab with the tests open because the favicon will turn from a green tick to a red cross if any test fails.
you can choose the way you run CI tests:
gaston tests browser
- this will run all the tests that need a browser in phantomjs, in test/browser/
.gaston tests node
- this will run all the tests without a browser, in test/node/
.gaston tests common
- this will run all the tests in test/common
once in node mode and then in browser mode.gaston tests
will default to browser mode
You can integrate this with any CI tool, because the exit code will be 0 if all tests pass or an error code if any test fails.Gaston exists to make your life easy so it comes ready to use out of the box. However, it also gives you a lot of freedom to do things your way.
Here's how a default config looks like, in your project's package.json:
{
"gaston": {
"port": 8080,
"socket-port": 9000,
"no-auto-reload": false,
"no-package": false,
"bundle": "./",
"build": "./",
"compilers": {
"js": "browserify",
"css": "less"
},
"remote-logging": true,
"require-paths": {
}
}
}
port - http server port
socket-port - websocket server port
(if you run multiple instances, the ports will be incremented by 1 for each new instance)
no-auto-reload - if true, browsers won't auto-reload after recompiling
no-package - if false, you will be able to require('package.json')
in your app
bundle relative path where bundle.js and bundle.css will be compiled to, relative to index.html
build relative path where build.js and build.css will be compiled to, relative to index.html
compilers
js browserify is, for now, the only compiler for javascript
css "less is, for now, the only compiler for less"
remote-logging this will allow you to receive all the consoles from other devices on your browser console
(if set to true, smaps will replace the standard source-maps - give it a go!)
(should be used with smaps, for awesome magic)
Gaston is meant to help you develop in a multi-device environment. As such, remote logging is here so you can see all the logs, infos, warns, debugs and errors from other devices(be it other desktop or mobile browsers or native builds for mobile, tv, set-top boxes, chromecasts, etc... ) running the same url. It uses our own smaps to let you see where the error stack traces or where in the code the logs originated. It works as follows:
<platform>-<device>-<browser>-<random_number>
gaston.identify()
in the browser console, and all connected devices will show their own idgaston.listen('ios')
- this will turn on listening to all ios devicesgaston.listen('ios', 'chrome')
- this will turn on listening to all ios devices running chromegaston.listen('ios', 'tablet')
- this will listen to all tablets running iosgaston.listen('123')
- this will listen to the device with id ending in 123gaston.unlisten(arguments)
using the same approach as with gaston.listengaston.unlisten('self')
or gaston.listen('self')
gaston.config.verbal
FAQs
buildtool for vigour-io
The npm package gaston receives a total of 0 weekly downloads. As such, gaston popularity was classified as not popular.
We found that gaston demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.