Skip to content

Commit 1ced725

Browse files
committed
Cleanup
1 parent 6c4bd15 commit 1ced725

File tree

14 files changed

+122
-51
lines changed

14 files changed

+122
-51
lines changed

.npmrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Comment out during package upgrades
2-
loglevel=silent
2+
loglevel=silent
3+
node-options=--max-old-space-size=8192

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Material Design Icons - Website Components
1+
# Pictogrammers - Components
22

3-
> Note this repo is for the components used in the Material Design Icons apps. If you want components for your own project look here:
3+
> Note this repo is for the components used in various Pictogrammers apps. If you are looking for icon related components for your own project look here:
44
>
55
> - [React](https://github.com/Templarian/MaterialDesign-React/)
66
> - [Web Component](https://github.com/Templarian/MaterialDesign-WebComponent/)
77
8-
The website is made of many components, view the `src/pg` folder to see the source.
8+
Components here are in various stages of development, view the `src/pg` folder to see the source.
99

1010
- [View the Components](https://pictogrammers.github.io/@pictogrammers/components/)
1111

@@ -15,7 +15,6 @@ To run the demo application locally use the following NPM commands.
1515

1616
```bash
1717
npm install
18-
npm test
1918
npm start
2019
# npm start [pgButton|pg-button, ...]
2120
```
@@ -38,7 +37,7 @@ npm run publish
3837

3938
### Web Components
4039

41-
Web Components with a very basic wrapper. The only magic is...
40+
Web Components with a [very basic wrapper](https://github.com/Pictogrammers/Element/). The only magic is...
4241

4342
- `@Prop() foo = 'Hello World`;
4443
- Calls `this.render()` on change.

package-lock.json

Lines changed: 17 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"start": "element-start",
1010
"build": "element-build",
1111
"publish": "element-publish",
12-
"publish2": "cross-env NODE_OPTIONS=--max_old_space_size=8192 mode=production webpack --config webpack.publish.config.js && node ./scripts/publish.js",
12+
"publish2": "cross-env NODE_OPTIONS=--max_old_space_size=8192 mode=production webpack --config ./webpack.publish.config.js && node ./scripts/publish.js",
1313
"test": "jest --no-cache"
1414
},
1515
"repository": {
@@ -25,12 +25,13 @@
2525
"remarkable": "^2.0.1"
2626
},
2727
"devDependencies": {
28-
"@pictogrammers/element": "0.0.66",
28+
"@pictogrammers/element": "0.0.67",
2929
"@pictogrammers/element-jest": "^0.1.10",
30-
"@pictogrammers/element-webpack": "^0.1.51",
30+
"@pictogrammers/element-webpack": "^0.1.53",
3131
"cross-env": "^7.0.3",
3232
"npm-run-all": "^4.1.5",
3333
"raw-loader": "^4.0.2",
34-
"typescript": "^5.9.3"
34+
"typescript": "^5.9.3",
35+
"webpack-cli": "^6.0.1"
3536
}
3637
}

scripts/publish.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
copyFolderSync,
1212
copyFolderContentsSync,
1313
eachComponent
14-
} from './utils';
14+
} from './utils.js';
1515
import { execSync } from "child_process";
1616

1717
// publish/
@@ -26,10 +26,10 @@ folder('publish');
2626
// Copy README.md to publish/README.md
2727
copyFileSync('README.md', 'publish/README.md');
2828
console.log(`Done: "README.md" copied to "publish/README.md`);
29-
copyFolderSync('dist', 'publish');
30-
removeFolder('publish/dist/api');
31-
remove('publish/dist/index.html');
32-
remove('publish/dist/main.js.LICENSE.txt');
29+
//copyFolderSync('dist', 'publish');
30+
//removeFolder('publish/dist/api');
31+
//remove('publish/dist/index.html');
32+
//remove('publish/dist/main.js.LICENSE.txt');
3333
// Write publish/package.json
3434
const pkg = JSON.parse(read('package.json'));
3535
delete pkg.private;
@@ -57,6 +57,8 @@ eachComponent('publish', ({ cls, namespace, component }) => {
5757
}
5858
});
5959
console.log(`Done: injecting "index.ts" into each component`);
60-
// Cleanup
60+
// Overwrite index.html
61+
copyFileSync('dist/index.html', 'publish/index.html');
62+
copyFileSync('dist/main.js', 'publish/main.js');
6163
// Final Message
6264
console.log(`Done! Please run "cd publish" and "npm publish".`);

scripts/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ export function eachComponent(srcDir, callback) {
141141
*/
142142
export function getComponents(srcDir) {
143143
const srcDir2 = srcDir
144-
? path.join(__dirname, '..', srcDir)
145-
: path.join(__dirname, '..');
144+
? path.join(import.meta.dirname, '..', srcDir)
145+
: path.join(import.meta.dirname, '..');
146146
console.log(srcDir2);
147147
const components = [];
148148
const namespaces = fs.readdirSync(srcDir2)

src/pg/database/__examples__/basic/basic.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<div class="example">
2-
<pg-database part="database"></pg-database>
2+
<!-- disable for now -->
3+
<!--<pg-database part="database"></pg-database>-->
34
<div>
45
Total Icons: <code part="count"></code>
56
</div>

src/pg/database/__examples__/basic/basic.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ export default class XPgDatabaseBasic extends HTMLElement {
1212

1313
@Prop() fontId = 'D051337E-BC7E-11E5-A4E9-842B2B6CFE1B';
1414

15-
@Part() $database: PgDatabase;
15+
//@Part() $database: PgDatabase;
1616

1717
@Part() $count: HTMLSpanElement;
1818
@Part() $total: HTMLSpanElement;
1919

2020
icons: Icon[] = [];
2121

2222
connectedCallback() {
23-
this.$database.addEventListener('sync', this.handleSync.bind(this));
24-
this.$database.font = this.fontId;
23+
//this.$database.addEventListener('sync', this.handleSync.bind(this));
24+
//this.$database.font = this.fontId;
2525
}
2626

2727
async handleSync(e: CustomEvent) {

src/pg/grid/__examples__/basic/basic.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
</label>
2323
</p>
2424
<div class="example">
25-
<pg-database part="database"></pg-database>
25+
<!--<pg-database part="database"></pg-database>
2626
<pg-grid part="grid">
2727
<p>No Icons Found! default slot content</p>
28-
</pg-grid>
28+
</pg-grid>-->
2929
</div>

src/pg/grid/__examples__/basic/basic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import template from './basic.html';
1111
template
1212
})
1313
export default class XPgGridBasic extends HTMLElement {
14-
14+
/*
1515
@Prop() fontId = 'D051337E-BC7E-11E5-A4E9-842B2B6CFE1B';
1616
1717
@Part() $button0: HTMLButtonElement;

0 commit comments

Comments
 (0)