Philipp Horstenkamp 6f5729c12a
Some checks failed
Lint / pre-commit Linting (push) Has been cancelled
First development of the deploy action (#6)
Deploy js code to an instance of screeps.
Some debugging tools are implemented.

Reviewed-on: #6
Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de>
Co-committed-by: Philipp Horstenkamp <philipp@horstenkamp.de>
2023-11-26 18:31:49 +01:00

33 lines
818 B
JavaScript

import resolve from 'rollup-plugin-node-resolve'
import builtins from 'rollup-plugin-node-builtins'
import commonjs from 'rollup-plugin-commonjs'
import babel from 'rollup-plugin-babel'
export default {
entry: 'src/index.js',
// external(id){
// return !!require('./package.json').dependencies[id];
// },
globals: {
ws: 'WebSocket',
'node-fetch': 'fetch'
},
external: ['ws', 'fs', 'node-fetch'],
moduleName: 'ScreepsAPI',
targets: [
{ dest: 'dist/ScreepsAPI.iife.js', format: 'iife' },
{ dest: 'dist/ScreepsAPI.umd.js', format: 'umd' },
{ dest: 'dist/ScreepsAPI.cjs.js', format: 'cjs' },
{ dest: 'dist/ScreepsAPI.es.js', format: 'es' }
],
plugins: [
builtins(),
commonjs(),
resolve({
module: true,
preferBuiltins: true
}),
babel()
]
}