Skip to content

Commit

Permalink
feat: upgrade to angular 6
Browse files Browse the repository at this point in the history
BREAKING CHANGE: angular 6 and rxjs 6 or higher are now required to use this package

Closes #31
  • Loading branch information
Matt Lewis committed May 9, 2018
1 parent 230016b commit d96c26e
Show file tree
Hide file tree
Showing 12 changed files with 481 additions and 307 deletions.
3 changes: 1 addition & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"parser": "typescript",
"singleQuote": true
}
}
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# angular 5.0+ drag and drop
# angular 6.0+ drag and drop

[![Build Status](https://travis-ci.org/mattlewis92/angular-draggable-droppable.svg?branch=master)](https://travis-ci.org/mattlewis92/angular-draggable-droppable)
[![codecov](https://codecov.io/gh/mattlewis92/angular-draggable-droppable/branch/master/graph/badge.svg)](https://codecov.io/gh/mattlewis92/angular-draggable-droppable)
[![npm version](https://badge.fury.io/js/angular-draggable-droppable.svg)](http://badge.fury.io/js/angular-draggable-droppable)
Expand All @@ -8,23 +9,25 @@
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/mattlewis92/angular-draggable-droppable/master/LICENSE)

## Demo

https://mattlewis92.github.io/angular-draggable-droppable/demo/

## Table of contents

- [About](#about)
- [Installation](#installation)
- [Documentation](#documentation)
- [Development](#development)
- [License](#licence)
* [About](#about)
* [Installation](#installation)
* [Documentation](#documentation)
* [Development](#development)
* [License](#licence)

## About

Observable powered drag and drop for angular 5.0+
Observable powered drag and drop for angular 6.0+

## Installation

Install through npm:

```
npm install --save angular-draggable-droppable
```
Expand Down Expand Up @@ -55,35 +58,38 @@ class DemoModule {}
`
})
class DemoApp {

droppedData: string;

dragEnd(event) {
console.log('Element was dragged', event);
}

}
```

You may also find it useful to view the [demo source](https://github.com/mattlewis92/angular-draggable-droppable/blob/master/demo/demo.component.ts).

## Documentation

All documentation is auto-generated from the source and can be viewed here:
https://mattlewis92.github.io/angular-draggable-droppable/docs/

## Development

### Prepare your environment

* Install [Node.js](http://nodejs.org/) and NPM (should come with)
* Install local dev dependencies: `npm install` while current directory is this repo

### Development server

Run `npm start` to start a development server on port 8000 with auto reload + tests.

### Testing

Run `npm test` to run tests once or `npm run test:watch` to continually run tests.

### Release

```bash
npm run release
```
Expand Down
4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<title>angular 5.0+ drag and drop</title>
<title>angular 6.0+ drag and drop</title>
</head>
<body>

Expand All @@ -20,7 +20,7 @@
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">angular 5.0+ drag and drop</a>
<a class="navbar-brand" href="#">angular 6.0+ drag and drop</a>
</div>
<ul class="nav navbar-nav hidden-xs">
<li><a href="#demo">Demo</a></li>
Expand Down
60 changes: 31 additions & 29 deletions karma.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as webpack from 'webpack';

export default function(config: any) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: './',

Expand All @@ -11,9 +10,7 @@ export default function(config: any) {
frameworks: ['mocha'],

// list of files / patterns to load in the browser
files: [
'test/entry.ts'
],
files: ['test/entry.ts'],

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
Expand All @@ -27,38 +24,43 @@ export default function(config: any) {
extensions: ['.ts', '.js']
},
module: {
rules: [{
test: /\.ts$/,
loader: 'tslint-loader',
exclude: /node_modules/,
enforce: 'pre',
options: {
emitErrors: config.singleRun,
failOnHint: config.singleRun
}
}, {
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/
}, {
test: /src\/.+\.ts$/,
exclude: /(test|node_modules)/,
loader: 'istanbul-instrumenter-loader',
enforce: 'post'
}, {
test: /node_modules\/@angular\/core\/.+\/core\.js$/,
parser: {
system: true // disable `System.import() is deprecated and will be removed soon. Use import() instead.` warning
rules: [
{
test: /\.ts$/,
loader: 'tslint-loader',
exclude: /node_modules/,
enforce: 'pre',
options: {
emitErrors: config.singleRun,
failOnHint: config.singleRun
}
},
{
test: /\.ts$/,
loader: 'ts-loader',
exclude: /node_modules/
},
{
test: /src\/.+\.ts$/,
exclude: /(test|node_modules)/,
loader: 'istanbul-instrumenter-loader',
enforce: 'post'
},
{
test: /node_modules\/@angular\/core\/.+\/core\.js$/,
parser: {
system: true // disable `System.import() is deprecated and will be removed soon. Use import() instead.` warning
}
}
}]
]
},
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: null,
test: /\.(ts|js)($|\?)/i
}),
new webpack.ContextReplacementPlugin(
/angular(\\|\/)core(\\|\/)esm5/,
/angular(\\|\/)core(\\|\/)fesm5/,
__dirname + '/src'
)
],
Expand Down Expand Up @@ -91,4 +93,4 @@ export default function(config: any) {
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['ChromeHeadless']
});
};
}
Loading

0 comments on commit d96c26e

Please sign in to comment.