-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: fix commonjs, removed rollup and umd
- Loading branch information
Showing
5 changed files
with
56 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
|
||
mkdir -p ./tmp | ||
npm pack | ||
mv *.tgz ./tmp | ||
tar xvzf tmp/*.tgz -C ./tmp | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const os = require('os'); | ||
const del = require('del'); | ||
|
||
const { exec } = require('child_process'); | ||
|
||
const isWindows = os.platform() === 'win32'; | ||
|
||
const cleanUp = async () => { | ||
return del(['./tmp']); | ||
}; | ||
|
||
function makeTestPackage(cb) { | ||
if (isWindows) { | ||
this.skip(); | ||
} | ||
|
||
exec('./scripts/mockPublish', cb); | ||
} | ||
|
||
describe('mock publish', () => { | ||
beforeEach(makeTestPackage); | ||
afterEach(cleanUp); | ||
|
||
// with regards to averting npm publishing disasters https://github.com/gulp-sourcemaps/gulp-sourcemaps/issues/246 | ||
it('can load a published version', (done) => { | ||
if (isWindows) { | ||
this.skip(); | ||
} | ||
|
||
try { | ||
// attempt to load a packed / unpacked potential deployed version | ||
// eslint-disable-next-line import/no-unresolved | ||
require('../tmp/package/lib/index'); | ||
} catch (error) { | ||
done(error); | ||
return; | ||
} | ||
|
||
done(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters