Skip to content

Commit

Permalink
Merge pull request #51 from edcarroll/develop
Browse files Browse the repository at this point in the history
v0.6.1 into master
  • Loading branch information
edcarroll authored Mar 28, 2017
2 parents db884ad + a6a605e commit 38f15c6
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ Thumbs.db
!*.config.js

# Output Files
demo/dist
demo/dist
bundles
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ N.B. you can import individual component modules:
import {SuiCheckboxModule, SuiRatingModule} from 'ng2-semantic-ui';
```

### SystemJS

If you're using SystemJS, add the following to your `systemjs.config.js` file:

```js
var config = {
...
map: {
...
'ng2-semantic-ui': 'npm:ng2-semantic-ui/bundles/ng2-semantic-ui.umd.min.js'
}
}
```

Now you're good to go!

## Dependencies
Expand Down
3 changes: 2 additions & 1 deletion components/util/positioning.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {ElementRef, EventEmitter} from '@angular/core';
const Popper = require('popper.js');
// We import the ES5 version manually so that rollup can uglify it.
import Popper from "popper.js/dist/popper.es5.js";

export type PositioningPlacement = "inherit" | "top-start" | "top" | "top-end" | "left-start" | "left" | "left-end" | "bottom-start" | "bottom" | "bottom-end" | "right-start" | "right" | "right-end";

Expand Down
2 changes: 1 addition & 1 deletion demo/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<sui-sidebar-container>
<sui-sidebar class="vertical inverted" transition="overlay" direction="left" #sidebar>
<sui-sidebar class="vertical inverted" transition="uncover" direction="left" #sidebar>
<demo-sidebar (onItemSelected)="sidebar.close()"></demo-sidebar>
</sui-sidebar>
<sui-sidebar-sibling [isDimmedWhenVisible]="true">
Expand Down
4 changes: 4 additions & 0 deletions demo/src/app/pages/getting-started/getting-started.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ <h2 class="ui dividing header">Installation</h2>
<demo-codeblock language="typescript" [src]="individualImportCode"></demo-codeblock>
</div>
<p>Now you're good to go!</p>
<p><strong>Note</strong> if you're using SystemJS, add the following to your <code>systemjs.config.js</code> file:</p>
<div class="ui segment">
<demo-codeblock language="typescript" [src]="systemJSCode"></demo-codeblock>
</div>
<h2 class="ui dividing header">Dependencies</h2>
<div class="ui bulleted list">
<div class="item"><a href="https://angular.io">Angular 2</a> (^4.0.0)</div>
Expand Down
11 changes: 10 additions & 1 deletion demo/src/app/pages/getting-started/getting-started.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Component } from '@angular/core';
})
export class GettingStartedPage {
public installCode:string = `$ npm install ng2-semantic-ui --save`;
public includeCssCode:string = `<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.4/semantic.min.css">`;
public includeCssCode:string = `<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.9/semantic.min.css">`;
public importCode:string = `import {SuiModule} from 'ng2-semantic-ui';`;
public moduleImportCode:string = `
import {SuiModule} from 'ng2-semantic-ui';
Expand All @@ -23,6 +23,15 @@ import {SuiModule} from 'ng2-semantic-ui';
bootstrap: [AppComponent]
})
export class AppModule {}
`;
public systemJSCode:string = `
var config = {
...
map: {
...
'ng2-semantic-ui': 'npm:ng2-semantic-ui/bundles/ng2-semantic-ui.umd.min.js'
}
}
`;
public individualImportCode:string = `import {SuiCheckboxModule, SuiRatingModule} from 'ng2-semantic-ui';`;
}
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "ng2-semantic-ui",
"main": "ng2-semantic-ui.dist.js",
"main": "bundles/ng2-semantic-ui.umd.min.js",
"module": "index.js",
"typings": "index.d.ts",
"version": "0.6.0",
"version": "0.6.1",
"description": "Angular 2 Semantic UI Components",
"repository": {
"type": "git",
Expand Down Expand Up @@ -51,7 +51,6 @@
"@angular/router": "^4.0.0",
"@types/prismjs": "~1.4.18",
"@types/protractor": "~4.0.0",
"@types/requirejs": "~2.1.28",
"codelyzer": "~2.0.0-beta.4",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
Expand Down
25 changes: 18 additions & 7 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import uglify from 'rollup-plugin-uglify'
export default {
moduleName: 'ng2-semantic-ui',
entry: 'index.js',
dest: 'ng2-semantic-ui.dist.js', // output a single application bundle
dest: 'bundles/ng2-semantic-ui.umd.min.js', // output a single application bundle
sourceMap: false,
format: 'iife',
format: 'umd',
onwarn: function(warning) {
// Skip certain warnings

Expand All @@ -16,21 +16,32 @@ export default {
return;
}
// intercepts in some rollup versions
if (warning.indexOf("The 'this' keyword is equivalent to 'undefined'") > -1 ) {
if (warning.message.indexOf("The 'this' keyword is equivalent to 'undefined'") > -1 ) {
return;
}

// console.warn everything else
console.warn(warning.message);
},
plugins: [
nodeResolve({ jsnext: true, module: true }),
nodeResolve({
jsnext: true,
module: true
}),
commonjs({
include: [
'node_modules/rxjs/**',
'node_modules/element-closest/**'
'node_modules/element-closest/**',
'node_modules/popper.js/**'
]
}),
uglify()
]
],
external: [
'@angular/common',
'@angular/core',
'@angular/forms',
'@angular/http',
'@angular/platform-browser',
'rxjs'
],
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"@angular/core": ["node_modules/@angular/core"],
"@angular/common": ["node_modules/@angular/common"],
"@angular/forms": ["node_modules/@angular/form"],
"rxjs": ["node_modules/rxjs"]
"rxjs": ["node_modules/rxjs"],
"popper.js/dist/popper.es5.js": ["typings/popper.override.ts"]
},
"rootDir": ".",
"sourceMap": true,
Expand Down

0 comments on commit 38f15c6

Please sign in to comment.