Skip to content

Commit d51c695

Browse files
committed
Removed noop/dev-ony package
1 parent 0fd0e03 commit d51c695

File tree

6 files changed

+3
-184
lines changed

6 files changed

+3
-184
lines changed

dev-only/index.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

dev-only/packages.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-spec",
3-
"version": "0.1.72",
3+
"version": "0.1.73",
44
"license": "LGPL-3.0",
55
"homepage": "https://github.com/js-works/js-spec",
66
"main": "index.js",
@@ -14,7 +14,6 @@
1414
},
1515
"files": [
1616
"index.js",
17-
"dev-only",
1817
"dist"
1918
],
2019
"devDependencies": {

rollup.config.js

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ const configs = []
1010

1111
for (const format of ['umd', 'cjs', 'amd', 'esm']) {
1212
for (const productive of [false, true]) {
13-
configs.push(createStandardConfig(format, productive))
13+
configs.push(createConfig(format, productive))
1414
}
15-
16-
configs.push(createNoopConfig(format))
1715
}
1816

1917
export default configs
2018

2119
// --- locals -------------------------------------------------------
2220

23-
function createStandardConfig(moduleFormat, productive) {
21+
function createConfig(moduleFormat, productive) {
2422
return {
2523
input: 'src/main/js-spec.ts',
2624

@@ -63,39 +61,3 @@ function createStandardConfig(moduleFormat, productive) {
6361
],
6462
}
6563
}
66-
67-
function createNoopConfig(moduleFormat) {
68-
return {
69-
input: 'src/main/js-spec.noop.ts',
70-
71-
output: {
72-
file: `dist/noop/js-spec.noop.${moduleFormat}.production.js`,
73-
74-
format: moduleFormat,
75-
name: 'jsSpec',
76-
sourcemap: false
77-
},
78-
79-
plugins: [
80-
resolve({
81-
jsnext: true,
82-
main: true,
83-
browser: true,
84-
}),
85-
// tslint({
86-
//}),
87-
replace({
88-
exclude: 'node_modules/**',
89-
90-
values: {
91-
'process.env.NODE_ENV': "'production'",
92-
}
93-
}),
94-
typescript({
95-
exclude: 'node_modules/**',
96-
}),
97-
moduleFormat === 'esm' ? terser() : uglifyJS(),
98-
gzip()
99-
],
100-
}
101-
}

src/main/js-spec.noop.ts

Lines changed: 0 additions & 98 deletions
This file was deleted.

src/test/api/Spec.test.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { from, of, range } from 'rxjs'
66
import { expect } from 'chai'
77

88
import * as StandardModule from '../../main/js-spec'
9-
import * as NoopModule from '../../main/js-spec.noop'
109
import Spec from '../../main/api/Spec'
1110
import SpecValidator from '../../main/api/SpecValidator'
1211
import SpecError from '../../main/api/SpecError'
@@ -962,37 +961,6 @@ describe('Spec', () => {
962961
})
963962
})
964963

965-
describe('Check whether standard module and dev-only module have the same API', () => {
966-
it('should export the same functions and objects', () => {
967-
const
968-
standardExports = Object.keys(StandardModule).sort(),
969-
noopExports = Object.keys(NoopModule).sort()
970-
971-
expect(standardExports).to.eql(noopExports)
972-
})
973-
974-
it('should be asserted that the conjunction of the keys sets of both Spec objects is empty', () => {
975-
const
976-
standardKeys = Object.keys(StandardModule.Spec),
977-
noopKeys = Object.keys(NoopModule.Spec),
978-
diff = new Set<string>()
979-
980-
for (const x of standardKeys) {
981-
if (!noopKeys.includes(x)) {
982-
diff.add(x)
983-
}
984-
}
985-
986-
for (const x of noopKeys) {
987-
if (!standardKeys.includes(x)) {
988-
diff.add(x)
989-
}
990-
}
991-
992-
expect(Array.from(diff)).to.eql([])
993-
})
994-
})
995-
996964
// --------------------------------------
997965

998966
function runSimpleSpecTest(config: { spec: SpecValidator, validValues: any[], invalidValues: any[]}) {

0 commit comments

Comments
 (0)