Skip to content

Commit 5a12522

Browse files
Merge branch 'develop'
2 parents 60ef2c9 + 1a235f5 commit 5a12522

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+163
-157
lines changed

.jshintrc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,5 @@
2626
"maxlen": false,
2727
"esnext": true,
2828
"node": true,
29-
"mocha": true,
30-
"globals": {
31-
"$traceurRuntime": true
32-
}
29+
"mocha": true
3330
}

.jshintrc.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,4 @@ maxlen: false # No maximum line length
2626

2727
esnext: true # ES6
2828
node: true # Node.js
29-
30-
globals: # Global variables
31-
$traceurRuntime: true
32-
33-
# For tests only
34-
before: true
35-
after: true
36-
describe: true
37-
it: true
29+
mocha: true

CHANGELOG.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.0.2
4+
5+
* Move to 6to5 3 in `selfContained` mode to avoid global scope pollution ([#354](https://github.com/SassDoc/sassdoc/issues/354#issuecomment-72464640))
6+
37
## 2.0.0 — Shiny Streamy Octopus
48

59
### API breaks for users
@@ -33,11 +37,11 @@
3337
### API breaks for third party integration
3438

3539
* The node API has been revamped and unified.
36-
* `sassdoc.documentize` does not exist anymore.
37-
* `sassdoc(src [, config])` execute the full Documentation process, returns a Promise.
38-
* `sassdoc([config])` execute the full Documentation process, returns a Stream of Vinyl files.
39-
* `sassdoc.parse(src [, config])` returns a Promise with the full data object.
40-
* `sassdoc.parse([config])` returns a Stream with the full data object.
40+
* `sassdoc.documentize` does not exist anymore.
41+
* `sassdoc(src [, config])` execute the full Documentation process, returns a Promise.
42+
* `sassdoc([config])` execute the full Documentation process, returns a Stream of Vinyl files.
43+
* `sassdoc.parse(src [, config])` returns a Promise with the full data object.
44+
* `sassdoc.parse([config])` returns a Stream with the full data object.
4145

4246
### New features
4347

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH := $(PWD)/node_modules/.bin:$(PATH)
22
SASSDOC := $(PWD)/bin/sassdoc
33
MOCHA := $(PWD)/node_modules/.bin/_mocha
4-
TO5_FLAGS := --experimental
4+
TO5_FLAGS = --experimental --loose all --optional selfContained
55

66
all: dist lint test
77

@@ -16,7 +16,7 @@ dist:
1616
# ============
1717

1818
lint: .jshintrc
19-
jshint bin/sassdoc index.js src test
19+
jshint --verbose bin/sassdoc index.js src test
2020

2121
.jshintrc: .jshintrc.yaml
2222
js-yaml $< > $@

bin/sassdoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22

33
'use strict';
44

5-
require('../polyfill');
6-
75
require('../dist/cli')(process.argv.slice(2));

index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
'use strict';
22

3-
require('./polyfill');
3+
var sassdoc = require('./dist/sassdoc');
44

5-
module.exports = require('./dist/sassdoc');
5+
module.exports = sassdoc.default;
6+
module.exports.parseFilter = sassdoc.parseFilter;
7+
module.exports.ensureEnvironment = sassdoc.ensureEnvironment;
8+
module.exports.parse = sassdoc.parse;
9+
module.exports.Environment = sassdoc.Environment;
10+
module.exports.Logger = sassdoc.Logger;
11+
module.exports.Parser = sassdoc.Parser;
12+
module.exports.sorter = sassdoc.sorter;
13+
module.exports.errors = sassdoc.errors;

package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"url": "https://twitter.com/pascalduez"
2222
}
2323
],
24-
"version": "2.0.1",
24+
"version": "2.0.2",
2525
"license": {
2626
"type": "MIT",
2727
"url": "http://opensource.org/licenses/MIT"
@@ -78,9 +78,9 @@
7878
"README.md"
7979
],
8080
"dependencies": {
81+
"6to5-runtime": "^3.3.3",
8182
"chalk": "^0.5.0",
8283
"concat-stream": "^1.4.7",
83-
"core-js": "^0.4.3",
8484
"docopt": "^0.4.1",
8585
"glob": "^4.3.1",
8686
"glob2base": "0.0.12",
@@ -90,24 +90,23 @@
9090
"minimatch": "^2.0.0",
9191
"mkdirp": "^0.5.0",
9292
"multipipe": "^0.1.2",
93-
"regenerator": "^0.8.3",
9493
"rimraf": "^2.2.8",
9594
"safe-wipe": "0.*",
96-
"sass-convert": "^0.4.0",
97-
"sassdoc-theme-default": "^2.0.0",
95+
"sass-convert": "^0.4.1",
96+
"sassdoc-theme-default": "^2.0.4",
9897
"scss-comment-parser": "^0.6.0",
9998
"through2": "^0.6.3",
10099
"update-notifier": "^0.3.0",
101100
"vinyl-fs": "^0.3.11",
102101
"vinyl-source-stream": "^1.0.0"
103102
},
104103
"devDependencies": {
105-
"6to5": "^2.9.4",
104+
"6to5": "^3.3.4",
106105
"coveralls": "^2.11.2",
107106
"dateformat": "^1.0.11",
108107
"istanbul": "^0.3.5",
109108
"jsesc": "^0.5.0",
110-
"jshint": "^2.5.10",
109+
"jshint": "^2.6.0",
111110
"mocha": "^2.0.1",
112111
"sinon": "^1.12.2",
113112
"vinyl": "^0.4.6"

polyfill.js

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

src/annotation/annotations/alias.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default function alias(env) {
1515
let alias = item.alias;
1616
let name = item.context.name;
1717

18-
let aliasedItem = data.find(i => i.context.name === alias);
18+
let aliasedItem = Array.find(data, i => i.context.name === alias);
1919

2020
if (aliasedItem === undefined) {
2121
env.logger.warn(`Item \`${name}\` is an alias of \`${alias}\` but this item doesn't exist.`);

src/annotation/annotations/require.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
const utils = require('../../utils');
1+
import { splitNamespace } from '../../utils';
2+
23
const uniq = require('lodash.uniq');
34

45
let reqRegEx = /^\s*(?:\{(.*)\})?\s*(?:(\$?[^\s]+))?\s*(?:-?\s*([^<$]*))?\s*(?:<?\s*(.*)\s*>)?$/;
@@ -15,7 +16,7 @@ export default function (env) {
1516
name: match[2],
1617
};
1718

18-
obj.external = utils.splitNamespace(obj.name).length > 1;
19+
obj.external = splitNamespace(obj.name).length > 1;
1920

2021
if (obj.name.indexOf('$') === 0) {
2122
obj.type = 'variable';
@@ -126,7 +127,7 @@ export default function (env) {
126127
return req;
127128
}
128129

129-
let reqItem = data.find(x => x.context.name === req.name);
130+
let reqItem = Array.find(data, x => x.context.name === req.name);
130131

131132
if (reqItem === undefined) {
132133
if (!req.autofill) {

0 commit comments

Comments
 (0)