Skip to content

Commit

Permalink
chore: Move some config files from root to config/
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Feb 27, 2021
1 parent 815e668 commit e2700f7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
File renamed without changes.
13 changes: 8 additions & 5 deletions jest.config.js → config/jest.config.js
Expand Up @@ -9,10 +9,7 @@ switch (process.env.npm_lifecycle_event) {
'^yaml/util$': '<rootDir>/dist/util.js',
'^yaml/test-events$': '<rootDir>/dist/test-events.js'
}
testPathIgnorePatterns.push(
'doc/createNode',
'doc/types'
)
testPathIgnorePatterns.push('doc/createNode', 'doc/types')
break

case 'test':
Expand All @@ -29,8 +26,14 @@ module.exports = {
collectCoverageFrom: ['src/**/*.{js,ts}', '!src/**/*.d.ts'],
moduleNameMapper,
resolver: 'jest-ts-webcompat-resolver',
rootDir: '..',
testEnvironment: 'node',
testMatch: ['**/tests/**/*.{js,ts}'],
testPathIgnorePatterns,
transform: { '/(src|tests)/.*\\.(js|ts)$': 'babel-jest' }
transform: {
'/(src|tests)/.*\\.(js|ts)$': [
'babel-jest',
{ configFile: './config/babel.config.js' }
]
}
}
Expand Up @@ -15,6 +15,7 @@ export default {
}),
babel({
babelHelpers: 'bundled',
configFile: './config/babel.config.js',
presets: [['@babel/env', { modules: false }]]
}),
typescript({ declaration: false, outDir: 'browser/dist' })
Expand Down
1 change: 1 addition & 0 deletions rollup.node-config.js → config/rollup.node-config.js
Expand Up @@ -17,6 +17,7 @@ export default {
plugins: [
babel({
babelHelpers: 'bundled',
configFile: './config/babel.config.js',
presets: [['@babel/env', { modules: false, targets: { node: '10.0' } }]]
}),
typescript(),
Expand Down
12 changes: 4 additions & 8 deletions package.json
Expand Up @@ -13,11 +13,7 @@
"homepage": "https://eemeli.org/yaml/",
"files": [
"browser/",
"dist/",
"*.d.ts",
"*.js",
"*.mjs",
"!*config.js"
"dist/"
],
"type": "commonjs",
"main": "./dist/index.js",
Expand All @@ -39,14 +35,14 @@
},
"scripts": {
"build": "npm run build:node && npm run build:browser",
"build:browser": "rollup -c rollup.browser-config.js",
"build:node": "rollup -c rollup.node-config.js",
"build:browser": "rollup -c config/rollup.browser-config.js",
"build:node": "rollup -c config/rollup.node-config.js",
"clean": "git clean -fdxe node_modules",
"lint": "eslint src/",
"prettier": "prettier --write .",
"prestart": "npm run build:node",
"start": "node -i -e 'YAML=require(\"./dist/index.js\")'",
"test": "jest",
"test": "jest --config config/jest.config.js",
"test:browsers": "cd playground && npm test",
"test:dist": "npm run build:node && jest",
"test:types": "tsc --noEmit",
Expand Down

0 comments on commit e2700f7

Please sign in to comment.