Vue ChromeCast plugin is a simple library using Google ChromeCast Web SDK to cast your website on supported devices and communicate with the remote web interface.
Vue ChromeCast plugin currently is using the deprecated SDK of ChromeCast, new ChromeCast API will be used soon in this plugin and more details on usage and installation will be also added in this README.
- Webpack starter-kit based to krasimir/webpack-library-starter
- Webpack 3 based.
- ES6 as a source.
- Exports in a umd format so your library works everywhere.
- ES6 test setup with Mocha and Chai.
- Linting with ESLint.
- Setting up the name of your library
- Open
webpack.config.jsfile and change the value oflibraryNamevariable. - Open
package.jsonfile and change the value ofmainproperty so it matches the name of your library.
- Build your library
- Run
yarn install(recommended) ornpm installto get the project's dependencies - Run
yarn buildornpm run buildto produce minified version of your library.
- Development mode
- Having all the dependencies installed run
yarn devornpm run dev. This command will generate an non-minified version of your library and will run a watcher so you get the compilation on file change.
- Running the tests
- Run
yarn testornpm run test
yarn buildornpm run build- produces production version of your library under thelibfolderyarn devornpm run dev- produces development version of your library and runs a watcheryarn testornpm run test- well ... it runs the tests :)yarn test:watchornpm run test:watch- same as above but in a watch mode
An example of using dependencies that shouldn’t be resolved by webpack, but should become dependencies of the resulting bundle
In the following example we are excluding React and Lodash:
{
devtool: 'source-map',
output: {
path: '...',
libraryTarget: 'umd',
library: '...'
},
entry: '...',
...
externals: {
react: 'react'
// Use more complicated mapping for lodash.
// We need to access it differently depending
// on the environment.
lodash: {
commonjs: 'lodash',
commonjs2: 'lodash',
amd: '_',
root: '_'
}
}
}