Skip to content

Commit

Permalink
Update to Angular-CLI 1.4.7 and Angular 4.4.5
Browse files Browse the repository at this point in the history
Also did some code clean up to please tslint.
  • Loading branch information
Cito committed Oct 14, 2017
1 parent 459e692 commit 0366678
Show file tree
Hide file tree
Showing 24 changed files with 8,558 additions and 210 deletions.
17 changes: 10 additions & 7 deletions angular-cli.json → .angular-cli.json
@@ -1,6 +1,6 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"version": "1.0.0-beta.26",
"name": "pinboard-pin"
},
"apps": [
Expand All @@ -14,25 +14,28 @@
],
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"polyfills": "polyfills.ts",
"tsconfig": "tsconfig.app.json",
"prefix": "app",
"mobile": false,
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"addons": [],
"packages": [],
"lint": [
{
"project": "src/tsconfig.app.json"
}
],
"defaults": {
"styleExt": "css",
"component": {},
"prefixInterfaces": false,
"inline": {
"style": false,
Expand Down
22 changes: 16 additions & 6 deletions .gitignore
Expand Up @@ -3,29 +3,39 @@
# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules

# built extensions
*.xpi
*.zip

# dependencies
/node_modules

# IDEs and editors
/.idea
/.vscode
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage/*
/coverage
/libpeerconnection.log
npm-debug.log
/typings

#System Files
# System Files
.DS_Store
Thumbs.db
8 changes: 5 additions & 3 deletions DEVELOP.md
@@ -1,7 +1,7 @@
Development Notes for Pinboard Pin
==================================

This is an add-on for pinning pages on [Pinboard](https://pinboard.in) in the web browser, based on the [WebExtensions](https://developer.mozilla.org/de/Add-ons/WebExtensions) system. This web extension has been developed for and tested with Firefox 50 for Windows and Linux. Since WebExtensions was created as a cross-browser standard, it should be portable to other platforms and web browsers like Chrome, Opera or Edge with only few adaptations.
This is an add-on for pinning pages on [Pinboard](https://pinboard.in) in the web browser, based on the [WebExtensions](https://developer.mozilla.org/de/Add-ons/WebExtensions) system. This web extension has been developed for and tested with Firefox 56 for Windows and Linux. Since WebExtensions was created as a cross-browser standard, it should be portable to other platforms and web browsers like Chrome, Opera or Edge with only few adaptations.

The web extension has been created using [Angular](https://angular.io/) and the [Angular CLI](https://github.com/angular/angular-cli).

Expand All @@ -11,6 +11,8 @@ Installation
Install the application for development:

npm install

On Windows, use Node 8.1.4 if installation fails.

Building and testing
--------------------
Expand Down Expand Up @@ -40,12 +42,12 @@ Known issues

* The web-ext tool currently doesn't work with the 64bit version for Firefox on Windows. As a workaround, set a the path with "--firefox=" when calling "web-ext run" or replace "(64)" with "(64-64)" in the line starting with "arch = " in node_modules/web-ext/node_modules/fx-runner/lib/utils.js.

* Since Firefox supports ES6, theoretically, it should be possible to set target="es6" in tsconfig.json. However, the current version of UglifyJS which is used by the Angular CLI to pack the JavaScript bundle doesn't support ES6 yet. It is possible to use the "harmony" branch of UglifyJS, which already supports ES 6. But this branch still has some problems with scoping which might result in glitches in the resulting code. Furthermore, the vendor.js bundle which is larger than main.js will still be ES 5.
* Since Firefox supports ES2015, theoretically, it should be possible to set target="es2015" in tsconfig.json. However, the Angular CLI uses UglifyJS which doesn't support ES6 yet. This should be solved in Angular CLI 1.5.

Future development
------------------

* Wait for UglifyJS to fully support ES6, then switch to target="es6" in tsconfig.json. Also find a way to create vendor.js in ES6.
* Wait for Angular CLI 1.5 and Angular 5, then switch to target="es2015" in tsconfig.json.

* The Pinboard API seems to have the "popular" and "recommended" categories interchanged in the "suggest" method for tags. "Popular" are actually those taken from our own tags, contrary to what the Pinboard API docs say. This has already been reported to the Pinboard support. If they will changed this behavior, we need to adapt our code that currently swaps these categories.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,7 +5,7 @@ Pinboard Pin is a modern web extension for pinning pages on [Pinboard](https://p

It pretty much replicates the functionality of the [Pinboard Plus](https://github.com/clvrobj/Pinboard-Plus) extension that has been created for the Chrome browser, but it has been rewritten from scratch to support Firefox using the modern [Angular](https://angular.io/) framework instead of a mix of the older [AngularJS](https://angularjs.org/), [jQuery](https://jquery.com/) and [Underscore](http://underscorejs.org/) libraries used by Pinboard Plus. This rewrite was also intended as a proof-of-concept that modern Angular is a viable platform for building web extensions.

The current version has been tested with Firefox 50 for Windows and Linux.
The current version has been tested with Firefox 56 for Windows and Linux.

Features:
---------
Expand Down

0 comments on commit 0366678

Please sign in to comment.