Skip to content

Commit ef608b6

Browse files
committed
initial port to ember-cli-addon-docs
1 parent bd5532b commit ef608b6

Some content is hidden

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

61 files changed

+2530
-1274
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ testem.js
1919
.node_modules.ember-try/
2020
bower.json.ember-try
2121
package.json.ember-try
22+
/config/addon-docs.js

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language: node_js
33
node_js:
44
# we recommend testing addons with the same minimum supported node version as Ember CLI
55
# so that your addon works for all apps
6-
- "4"
6+
- "6"
77

88
sudo: false
99
dist: trusty

addon/components/keyword-complete.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default Component.extend({
128128

129129
/**
130130
* Whether the completion is enabled or disabled.
131-
* @property Boolean
131+
* @property enabled
132132
* @type Boolean
133133
* @default true
134134
* @public
@@ -137,7 +137,7 @@ export default Component.extend({
137137

138138
/**
139139
* Wether the completion should have a typing state
140-
* @property Boolean
140+
* @property shouldShowTypingState
141141
* @type Boolean
142142
* @default false
143143
* @public
@@ -154,14 +154,14 @@ export default Component.extend({
154154

155155
/**
156156
* Virtual caret that indicates the current completion start position
157-
* @readonly
157+
* @readOnly
158158
* @type number | null
159159
*/
160160
caretStart: null,
161161

162162
/**
163163
* Virtual caret that indicates the current completion end position
164-
* @readonly
164+
* @readOnly
165165
* @type number | null
166166
*/
167167
caretEnd: null,
@@ -643,7 +643,7 @@ export default Component.extend({
643643
},
644644
/**
645645
* Action that refreshes the suggestion list
646-
* @return {*}
646+
* @return {void}
647647
*/
648648
refreshSuggestions() {
649649
return this.updateSuggestions();
@@ -652,6 +652,7 @@ export default Component.extend({
652652
/**
653653
* Action to move the selection to a given position
654654
* @param {number} position
655+
* @return {void}
655656
*/
656657
moveCaret(position) {
657658
setCaretPosition(this.get('input'), position);

bower.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "ember-keyword-complete",
33
"dependencies": {
4-
"prism": "^1.6.0",
54
"emojione": "^2.2.7"
65
},
76
"version": "1.0.1"

config/addon-docs.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-env node */
2+
'use strict';
3+
4+
const AddonDocsConfig = require('ember-cli-addon-docs/lib/config');
5+
6+
module.exports = class extends AddonDocsConfig {
7+
// See https://ember-learn.github.io/ember-cli-addon-docs/latest/docs/deploying
8+
// for details on configuration you can override here.
9+
};

config/deploy.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* eslint-env node */
2+
'use strict';
3+
4+
module.exports = function(deployTarget) {
5+
let ENV = {
6+
build: {}
7+
// include other plugin configuration that applies to all deploy targets here
8+
};
9+
10+
if (deployTarget === 'development') {
11+
ENV.build.environment = 'development';
12+
// configure other plugins for development deploy target here
13+
}
14+
15+
if (deployTarget === 'staging') {
16+
ENV.build.environment = 'production';
17+
// configure other plugins for staging deploy target here
18+
}
19+
20+
if (deployTarget === 'production') {
21+
ENV.build.environment = 'production';
22+
// configure other plugins for production deploy target here
23+
}
24+
25+
// Note: if you need to build some configuration asynchronously, you can return
26+
// a promise that resolves with the ENV object instead of returning the
27+
// ENV object synchronously.
28+
return ENV;
29+
};

ember-cli-build.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
55
module.exports = function(defaults) {
66
let app = new EmberAddon(defaults, {
77
// Add options here
8-
'ember-prism': {
9-
//'theme': 'default',
10-
'components': ['bash', 'handlebars', 'javascript']
11-
}
128
});
139

1410
/*

jsdoc-ast.sh

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

package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,33 +31,34 @@
3131
"broccoli-asset-rev": "^2.4.5",
3232
"ember-ajax": "^3.0.0",
3333
"ember-cli": "~3.1.1",
34+
"ember-cli-addon-docs": "^0.4.0",
35+
"ember-cli-addon-docs-yuidoc": "^0.2.0",
3436
"ember-cli-dependency-checker": "^2.0.0",
37+
"ember-cli-deploy": "^1.0.2",
38+
"ember-cli-deploy-build": "^1.1.1",
39+
"ember-cli-deploy-git": "^1.3.3",
40+
"ember-cli-deploy-git-ci": "^1.0.1",
3541
"ember-cli-eslint": "^4.2.1",
36-
"ember-cli-github-pages": "^0.1.2",
3742
"ember-cli-htmlbars": "^2.0.3",
3843
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
3944
"ember-cli-inject-live-reload": "^1.4.1",
4045
"ember-cli-qunit": "^4.1.1",
4146
"ember-cli-sass": "^7.0.0",
4247
"ember-cli-shims": "^1.2.0",
43-
"ember-cli-showdown": "^4.1.0",
44-
"ember-cli-skeleton": "0.0.5",
4548
"ember-cli-sri": "^2.1.0",
4649
"ember-cli-uglify": "^2.0.0",
4750
"ember-disable-prototype-extensions": "^1.1.2",
4851
"ember-export-application-global": "^2.0.0",
4952
"ember-load-initializers": "^1.0.0",
5053
"ember-maybe-import-regenerator": "^0.1.6",
5154
"ember-native-dom-helpers": "^0.5.4",
52-
"ember-prism": "^0.2.0",
5355
"ember-resolver": "^4.0.0",
5456
"ember-source": "~3.1.0",
5557
"ember-source-channel-url": "^1.0.1",
5658
"ember-truth-helpers": "^1.3.0",
5759
"ember-try": "^0.2.23",
5860
"eslint-plugin-ember": "^5.0.0",
5961
"eslint-plugin-node": "^6.0.1",
60-
"jsdoc": "^3.5.5",
6162
"loader.js": "^4.2.3"
6263
},
6364
"engines": {
@@ -67,7 +68,5 @@
6768
"configPath": "tests/dummy/config",
6869
"demoURL": "https://makepanic.github.io/ember-keyword-complete/"
6970
},
70-
"resolutions": {
71-
"prismjs": "1.8.1"
72-
}
71+
"homepage": "https://makepanic.github.io/ember-keyword-complete"
7372
}

tests/acceptance/demo-test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module('Acceptance | demo', function (hooks) {
5050
setupApplicationTest(hooks);
5151

5252
test('completes using single data source', async function (assert) {
53-
await visit('/demos/emoji');
53+
await visit('/docs/demos/emoji');
5454
const textArea = find('#complete-textarea');
5555
await type(textArea, ':smil');
5656
assert.equal(find('.complete-tooltip-body ul').childElementCount, 0);
@@ -84,7 +84,7 @@ module('Acceptance | demo', function (hooks) {
8484
});
8585

8686
test('completes from multiple data sources by using a keyword identifier (@ vs :)', async function (assert) {
87-
await visit('/demos/emoji-and-users');
87+
await visit('/docs/demos/multiple');
8888

8989
const textArea = find('#complete-textarea');
9090
const text = textArea.value;
@@ -132,7 +132,7 @@ module('Acceptance | demo', function (hooks) {
132132
});
133133

134134
test('handles moveCaret actions', async function (assert) {
135-
await visit('/demos/actions');
135+
await visit('/docs/demos/actions');
136136

137137
const textArea = find('#complete-textarea');
138138

@@ -147,7 +147,7 @@ module('Acceptance | demo', function (hooks) {
147147
});
148148

149149
test('handles preselectValueAt action', async function (assert) {
150-
await visit('/demos/actions');
150+
await visit('/docs/demos/actions');
151151

152152
const textArea = find('#complete-textarea-preselect');
153153
await type(textArea, ' :smi');
@@ -163,7 +163,7 @@ module('Acceptance | demo', function (hooks) {
163163
});
164164

165165
test('handles refreshSuggestions action', async function (assert) {
166-
await visit('/demos/actions');
166+
await visit('/docs/demos/actions');
167167

168168
const $button = $('#button--refreshSuggestions');
169169
const textArea = find('#complete-textarea-refresh');

0 commit comments

Comments
 (0)