Skip to content

Commit

Permalink
Merge pull request #83 from pmowrer/revert-fileName
Browse files Browse the repository at this point in the history
Revert #74
  • Loading branch information
pmowrer authored Feb 4, 2020
2 parents 8f29d48 + 20d5a1f commit c86dec4
Show file tree
Hide file tree
Showing 6 changed files with 1,948 additions and 920 deletions.
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"presets": [
[
"@babel/preset-env"
]
]
}
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## 4.1.0
## *Deprecated*
For versions above **4.1.0**, please refer to "Releases" in GitHub UI.

- Return `fileName` to have sass-loader handle dependency correctly (#74).
## 4.1.0

## 4.0.1
* Update package.json's main field (#73).
Expand Down
23 changes: 13 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-sass-json-importer",
"version": "4.0.1",
"version": "0.0.0-development",
"description": "Allows importing json in sass files parsed by node-sass.",
"main": "dist/index.js",
"license": "MIT",
Expand All @@ -15,23 +15,26 @@
"json"
],
"scripts": {
"test": "mocha --compilers js:babel/register",
"test": "mocha --require @babel/register",
"compile": "mkdirp dist && babel src -d dist",
"prepublish": "npm run compile"
"prepublishOnly": "npm run compile"
},
"peerDependencies": {
"node-sass": ">=3.5.3"
},
"dependencies": {
"is-there": "^4.0.0",
"json5": "^1.0",
"lodash": "^4.17"
"is-there": "^4.4.4",
"json5": "^2.1.1",
"lodash": "^4.17.15"
},
"devDependencies": {
"babel": "^5.8.23",
"chai": "^3.2.0",
"mkdirp": "^0.5.1",
"mocha": "^2.3.2",
"@babel/cli": "^7.8.4",
"@babel/core": "^7.8.4",
"@babel/preset-env": "^7.8.4",
"@babel/register": "^7.8.3",
"chai": "^4.2.0",
"mkdirp": "^1.0.3",
"mocha": "^7.0.1",
"node-sass": ">=3.5.3",
"semantic-release": "^17.0.2",
"semantic-release-github-pr": "^6.0.0"
Expand Down
1 change: 0 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export default function(options = {}) {

return {
contents: transformJSONtoSass(json),
file: fileName,
};
} catch(error) {
return new Error(`node-sass-json-importer: Error transforming JSON/JSON5 to SASS. Check if your JSON/JSON5 parses correctly. ${error}`);
Expand Down
4 changes: 0 additions & 4 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ describe('node-sass-json-importer', function() {
});

expect(result.css.toString()).to.eql(EXPECTATION);
expect(result.stats.includedFiles).to.eql([
resolve('./test/fixtures/strings/style.scss'),
resolve('./test/fixtures/strings/variables.json'),
].sort());
});

// TODO: Added to verify named exports + CommonJS default export hack (see index.js).
Expand Down
Loading

0 comments on commit c86dec4

Please sign in to comment.