committed by
Jay Linski
parent
e0f50b4eec
commit
03d387bf8e
@@ -56,6 +56,7 @@ jobs:
|
||||
# https://github.com/webpack/webpack/issues/14532
|
||||
if: ${{ matrix.node-version != '17' }}
|
||||
run: |
|
||||
cd ./tests/integration/rollup-test && ./test.sh && cd -
|
||||
cd ./tests/integration/webpack-babel-test && ./test.sh && cd -
|
||||
cd ./tests/integration/webpack-test && ./test.sh && cd -
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createNewLookupObject } from './create-new-lookup-object';
|
||||
import * as logger from '../logger';
|
||||
import logger from '../logger';
|
||||
|
||||
const loggedProperties = Object.create(null);
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: ['eslint:recommended', 'prettier'],
|
||||
env: {
|
||||
browser: true
|
||||
},
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
ecmaVersion: 6
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
dist
|
||||
package-lock.json
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "rollup-test",
|
||||
"description": "Various tests with Handlebars and rollup",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"build": "rollup --config rollup.config.js --failAfterWarnings"
|
||||
},
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-node-resolve": "^13.1.1",
|
||||
"handlebars": "file:../../..",
|
||||
"rollup": "^2.61.1"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
||||
|
||||
export default {
|
||||
input: 'src/index.js',
|
||||
output: {
|
||||
file: 'dist/bundle.js',
|
||||
format: 'es'
|
||||
},
|
||||
plugins: [nodeResolve()]
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
import Handlebars from 'handlebars/lib/handlebars';
|
||||
|
||||
const template = Handlebars.compile('Author: {{author}}');
|
||||
const result = template({ author: 'Yehuda' });
|
||||
|
||||
if (result !== 'Author: Yehuda') {
|
||||
throw Error('Assertion failed');
|
||||
}
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Cleanup: package-lock and "npm ci" is not working with local dependencies
|
||||
rm dist package-lock.json -rf
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
node dist/bundle.js
|
||||
echo "Success"
|
||||
Reference in New Issue
Block a user