-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ComponentExample): add github links to editor #586
Conversation
c071bc7
to
f3eb2ab
Compare
@@ -155,8 +159,8 @@ export default class ComponentExample extends Component { | |||
// consider everything after the imports to be the body | |||
// remove `export` statements except `export default class|function` | |||
const body = _.get(/import[\s\S]*from '\w+'([\s\S]*)/.exec(sourceCode), '[1]', '') | |||
.replace(/export\s+default\s+\w+([\s\n]+)?/, '') // remove `export default Foo` statements (lines) | |||
.replace(/export\s+default\s+/, '') // remove `export default` | |||
.replace(/export\s+default\s+(?!class|function)\w+([\s\n]+)?/, '') // remove `export default Foo` statements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes examples that use "export default class Foo" statements.
Current coverage is 100% (diff: 100%)@@ master #586 diff @@
====================================
Files 118 118
Lines 1871 1871
Methods 0 0
Messages 0 0
Branches 0 0
====================================
Hits 1871 1871
Misses 0 0
Partials 0 0
|
@@ -72,6 +72,7 @@ config = Object.assign({}, config, { | |||
'brace/mode/html', | |||
'brace/theme/tomorrow', | |||
'classnames', | |||
'copy-to-clipboard', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This moves copy clipboard to the vendor dll bundle. The dll bundle is used for files that change rarely. It makes watch mode rebuilds of the primary app code much faster.
Added copy text confirmation, link to edit the example on GitHub, link to add a bug on GitHub. The bug button prefills the issue template with the relevant information as well: