Skip to content

PieceMeta/piecemeta-angular-frontend

Repository files navigation

PieceMeta Angular Frontend

Code Climate devDependency Status

The Web and NodeWebkit frontend based on AngularJS for the PieceMeta service.

**Important: This version of the frontend (1.x.x) is only compatible with the LMDB branch of the API **

Stability

Experimental: Expect the unexpected. Please provide feedback on api and your use-case.

Web Frontend

The web app consists of static code only so you can just clone the repo, set the dist/web folder as the document root and it should work.

Since the app uses Angular in HTML5 mode, you need to make sure that every 404 not found error gets redirected to index.html. There's a bundled .htaccess so at least apache setup should be effortless.

Development

Copy configuration.default.js to configuration.js and update as needed.

npm install
bower install
gulp build-web

NodeWebkit Frontend

To build the native modules you need nw-gyp and node-pre-gyp.

Once built you'll find the resulting app in the build folder. To build a Node-Webkit application, edit gulpfile.js and enter your platform at the bottom in the build-webkit-app task. It can then be built with:

npm install
bower install
cd dist/nw
npm install
cd ..
gulp node-webkit

After the basic build you need to perform these steps to rebuild the native modules for your architecture. You only need to do this one time, the binaries are reused each time you run the grunt task.

cd dist/nw/node_modules/osc/node_modules/serialport
node-pre-gyp rebuild --target=0.12.1 --runtime=node-webkit
cd ../ws/node_modules/bufferutil
nw-gyp configure --target=0.12.1
nw-gyp build
cd ../utf-8-validate
nw-gyp configure --target=0.12.1
nw-gyp build

Finally, you can build your Node-Webkit app with:

gulp build-webkit-app

Note: If you are building for Windows, you need to flatten dist/nw/node_modules before building the app. This is due to the 256 character path length limit in Windows.

Install flatten-packages and then run

cd dist/nw/
flatten-packages

About

Angular-based web frontend for PieceMeta service

Resources

Stars

Watchers

Forks

Packages

No packages published