Skip to content

Commit

Permalink
New codebase based on Angular CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Jun 2, 2017
1 parent 15d7b26 commit 70983aa
Show file tree
Hide file tree
Showing 820 changed files with 66,270 additions and 62 deletions.
68 changes: 68 additions & 0 deletions .angular-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "primeng"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.png"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css",
"../node_modules/fullcalendar/dist/fullcalendar.min.css",
"../node_modules/quill/dist/quill.snow.css",
"../node_modules/font-awesome/css/font-awesome.min.css"
],
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/moment/moment.js",
"../node_modules/chart.js/dist/Chart.js",
"../node_modules/fullcalendar/dist/fullcalendar.js",
"../node_modules/quill/dist/quill.js",
"../node_modules/prismjs/prism.js",
"../node_modules/prismjs/components/prism-typescript.js"
],
"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"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}
12 changes: 7 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# http://editorconfig.org

# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = false
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
80 changes: 49 additions & 31 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
/components
/resources
/aot

# dependencies
node_modules

# generated by compilation
primeng.js
components/**/*.js
showcase/*.js
showcase/demo/**/*.js
showcase/setup/*.js
showcase/theming/*.js
*.map

# production showcase bundle
dist

# distribution resources
resources/**/*.css
resources/images

# type definition
*.d.ts

# aot
aot
components/**/*.metadata.json

# misc
*.log
.DS_STORE
.idea
.vscode
.sass-cache
/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
testem.log
/typings

# themes
/src/assets/components/themes/**/*.css
/src/assets/components/themes/**/*.map
!/src/assets/components/themes/bootstrap/theme.css

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

# System Files
.DS_Store
Thumbs.db
70 changes: 44 additions & 26 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,53 @@
# compiled output
/dist
/tmp
/out-tsc
/aot

# source
src

# test
e2e
karmaconf.js
protractor.conf.js

# dependencies
node_modules

# demo
showcase
index.html
upload.php
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
.editor-config

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

# typescript
*.ts
!*.d.ts

# git
.git
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
testem.log
/typings
.gitignore

# config
.angular-cli.json
tsconfig.json
tsconfig-aot.json
webpack.config.js
config
gulpfile.js

# aot
aot

# misc
.github
.vscode
*.log
prod
.editorconfig


tsconfig-release.json
tslint.json

# System Files
.DS_Store
Thumbs.db
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Primeng

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

## 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|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/).
Before running the tests make sure you are serving the app via `ng serve`.

## 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).
16 changes: 16 additions & 0 deletions e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { PrimengPage } from './app.po';

describe('primeng App', () => {
let page: PrimengPage;

beforeEach(() => {
page = new PrimengPage();
});

it('should display welcome message', done => {
page.navigateTo();
page.getPROText()
.then(msg => expect(msg).toEqual('PrimeNG PRO Support'))
.then(done, done.fail);
});
});
11 changes: 11 additions & 0 deletions e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { browser, by, element } from 'protractor';

export class PrimengPage {
navigateTo() {
return browser.get('/');
}

getPROText() {
return element(by.css('.pro-title')).getText();
}
}
12 changes: 12 additions & 0 deletions e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"node"
]
}
}
50 changes: 50 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
'use strict';

var gulp = require('gulp'),
concat = require('gulp-concat'),
uglifycss = require('gulp-uglifycss'),
rename = require('gulp-rename'),
del = require('del'),
flatten = require('gulp-flatten');

gulp.task('build-css', function() {
gulp.src([
'src/app/components/common/common.css',
'src/app/components/**/*.css'
])
.pipe(concat('primeng.css'))
.pipe(gulp.dest('resources'));
});

gulp.task('build-css-prod', function() {
gulp.src([
'src/app/components/common/common.css',
'src/app/components/**/*.css'
])
.pipe(concat('primeng.css'))
.pipe(gulp.dest('resources'))
.pipe(uglifycss({"uglyComments": true}))
.pipe(rename('primeng.min.css'))
.pipe(gulp.dest('resources'));
});

gulp.task('images', function() {
return gulp.src(['src/app/components/**/images/*.png', 'src/app/components/**/images/*.gif'])
.pipe(flatten())
.pipe(gulp.dest('resources/images'));
});

gulp.task('themes', function() {
return gulp.src(['src/assets/components/themes/**/*'])
.pipe(gulp.dest('resources/themes'));
});

//Cleaning previous gulp tasks from project
gulp.task('clean', function() {
del(['resources']);
});

//Building project with run sequence
gulp.task('build-assets', ['clean','build-css-prod', 'images', 'themes']);


Loading

0 comments on commit 70983aa

Please sign in to comment.