This repository has been archived by the owner on Nov 4, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
72 additions
and
96 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ desktop.ini | |
should.js.for-tests | ||
*.swp | ||
npm-debug.log | ||
cjs/ | ||
es6/ |
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 |
---|---|---|
@@ -1 +1 @@ | ||
module.exports = require('./lib/should'); | ||
module.exports = require('./cjs/should'); |
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 |
---|---|---|
@@ -1 +1,12 @@ | ||
should = require('./index'); | ||
import should from './es6/should'; | ||
|
||
var defaultProto = Object.prototype; | ||
var defaultProperty = 'should'; | ||
|
||
//Expose api via `Object#should`. | ||
try { | ||
var prevShould = should.extend(defaultProperty, defaultProto); | ||
should._prevShould = prevShould; | ||
} catch (e) { | ||
//ignore errors | ||
} |
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
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 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,44 @@ | ||
/*eslint-env node */ | ||
'use strict'; | ||
|
||
const nodeResolve = require('rollup-plugin-node-resolve'); | ||
|
||
const pkg = require('./package.json'); | ||
|
||
const banner = `/*! | ||
* ${pkg.name} - ${pkg.description} | ||
* @version v${pkg.version} | ||
* @author ${pkg.author} | ||
* @link ${pkg.homepage} | ||
* @license ${pkg.license} | ||
*/ | ||
`; | ||
|
||
const outro = ` | ||
if (typeof define === 'function' && define.amd) { | ||
define([], function() { return should }); | ||
} else if (typeof module === 'object' && module.exports) { | ||
module.exports = should; | ||
} else { | ||
this.Should = should; | ||
Object.defineProperty(this, 'should', { | ||
enumerable: false, | ||
configurable: true, | ||
value: should | ||
}); | ||
}`; | ||
|
||
module.exports = { | ||
entry: 'browser-entry.js', | ||
banner, | ||
outro, | ||
format: 'iife', | ||
plugins: [ | ||
nodeResolve({ | ||
jsnext: true, | ||
main: true, | ||
preferBuiltins: false | ||
}) | ||
] | ||
}; |