Skip to content

Commit

Permalink
feat(build): Move build and dev environment to angular cli and ng-pac…
Browse files Browse the repository at this point in the history
…kagr

Simplified the dev and build environment to be based on the cli
  • Loading branch information
edoparearyee committed Dec 1, 2017
1 parent 55c6f64 commit cbc473c
Show file tree
Hide file tree
Showing 85 changed files with 8,395 additions and 9,128 deletions.
60 changes: 60 additions & 0 deletions .angular-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "angular-scroll-collapse"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "sn",
"styles": [
"styles.scss"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"component": {}
}
}
52 changes: 46 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,14 +1,54 @@
# http://editorconfig.org
# ____ __ __ __ _
# / ___) / \ / \ ( ( \
# \___ \( O )( O )/ / ____
# (____/ \__/ \__/ \_)__)(____)
#
# SOON_ Cross team root editorconfig configuration
# Projects can also have a local .editorconfig to customise syntax
#

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true

# Backend Languages (Python, Go, Ruby etc)

# Python
[*.py]
indent_style = space
indent_size = 4
line_length=80
multi_line_output=3
default_section=THIRDPARTY
import_heading_stdlib=Standard Libs
import_heading_thirdparty=Third Party Libs
import_heading_firstparty=First Party Libs
lines_after_imports=2

# Ruby
[{*.rb,Vagrantfile}]
indent_style = space
indent_size = 2
insert_final_newline = true

# Front End Languages (HTML, JS/TS, CSS etc)

[*.{js, ts, css, html}]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true

## JS/TS
[*.{js, ts}]
quote_type = single

# Misc

[*.md]
max_line_length = 0
trim_trailing_whitespace = false
# YAML Based files - 2 space indent
[*.{yml, yaml, sls}]
indent_style = space
indent_size = 2
54 changes: 41 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
.DS_STORE
dist/
node_modules/
out-tsc/
debug.log
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.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
/libpeerconnection.log
npm-debug.log
src/**/*.js
!src/demo/systemjs.config.js
!src/demo/systemjs.config.lib.js
!**/*systemjs-angular-loader.js
*.js.map
e2e/**/*.js
e2e/**/*.js.map
coverage
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ before_install:
# Install latest chrome.
- export CHROME_BIN=chromium-browser
install:
- npm install
- npm install --no-progress
script:
- npm run lint
- npm run test:once
- npm run integration
- npm run test -- --no-progress --code-coverage --single-run --browser=ChromeNoSandbox
- npm run e2e -- --no-progress
- npm run coverage
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2014-2016 Google, Inc.
Copyright (c) 2017 SOON London Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
[![Build Status][travis-badge]][travis-badge-url]
[![Coverage Status][coveralls-badge]][coveralls-badge-url]

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.5.4.

A simple lightweight library for [Angular (2/4+)][angular] with no other dependencies that detects scroll direction and adds a `sn-scrolling-up` or `sn-scrolling-down` class to the element. The library can also detect when the user has scrolled passed the element and apply a `sn-affix` class. Useful for make a element sticky when the user has scrolled beyond it. This library can will also apply `sn-minimise` class after the user has scrolled beyond the height of the element.

This is a simple library for [Angular][angular], implemented in the [Angular Package Format v4.0](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/edit#heading=h.k0mh3o8u5hx).
This is a simple library for [Angular][angular], implemented in the [Angular Package Format v5.0](https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/edit#heading=h.k0mh3o8u5hx).


## Install
Expand Down Expand Up @@ -106,6 +108,32 @@ In this scenario the nav element will have the class `sn-minimise` added when th
</header>
```


## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).


[travis-badge]: https://travis-ci.org/thisissoon/angular-scroll-collapse.svg?branch=master
[travis-badge-url]: https://travis-ci.org/thisissoon/angular-scroll-collapse
[coveralls-badge]: https://coveralls.io/repos/github/thisissoon/angular-scroll-collapse/badge.svg?branch=master
Expand Down
10 changes: 0 additions & 10 deletions bs-config.json

This file was deleted.

Loading

0 comments on commit cbc473c

Please sign in to comment.