Parcel plugin that interpolates v1 plugin JS into v2 JS file
Also see: parcel-plugin-zengine-html-migrator parcel-plugin-zengine-css-migrator
npm i -d parcel-plugin-zengine-js-migrator
Attention: parcel-bundler has to be installed
- Add this multi-line-style comment:
/* PLUGIN_JS */
to yoursrc/plugin.js
(probably at the bottom of that file). - Ensure all of your plugin's JS lives in
v1-output/plugin.js
- Run parcel normally
src/plugin.js
import { plugin } from './wrapper.js'
/* PLUGIN_JS */
run it
parcel index.html
output
import { plugin } from './wrapper.js'
plugin.controller('myController', ['$scope', 'myService', function ($scope, srv) {
// awesome plugin code
}])
// ...lots more great code...
plugin.register('myCoolPlugin', {
route: '/my-cool-plugin',
title: 'Useless Title',
icon: 'icon-puzzle',
interfaces: [{
controller: 'myController',
template: 'my-template',
type: 'fullPage',
order: 300,
topNav: true,
routes: ['/:page']
}]
})