Skip to content

Commit

Permalink
Keep everything as TypeScript, no longer create a dist.
Browse files Browse the repository at this point in the history
  • Loading branch information
scatcher committed Jan 10, 2017
1 parent f9f81c6 commit 5323137
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 451 deletions.
420 changes: 0 additions & 420 deletions dist/angular-point-group-manager.js

This file was deleted.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "angular-point-group-manager",
"version": "5.0.0",
"version": "5.0.1",
"description": "angular-point tool to manage SharePoint users and groups.",
"main": "dist/angular-point-group-manager.js",
"directories": {
"test": "test"
},
Expand All @@ -26,7 +25,6 @@
"@types/source-map": "~0.5.0",
"@types/toastr": "^2.1.32",
"awesome-typescript-loader": "^3.0.0-beta.17",
"codelyzer": "^2.0.0-beta.4",
"tslint": "^4.3.1",
"tslint-loader": "^3.3.0",
"typescript": "~2.1.1",
Expand Down
23 changes: 11 additions & 12 deletions src/groupManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {DataContainer} from './dataContainer';
import {IXMLGroup, IXMLUser, DataService} from 'angular-point';

export class GroupManagerController {

static $inject = ['NgTableParams', '$filter', '$timeout', '$q', 'apDataService'];
activeTab = 'Users';
assignedOptions = [];
Expand All @@ -21,12 +20,12 @@ export class GroupManagerController {
users = new DataContainer();
usersTable: Object;

constructor(
private NgTableParams,
private $filter: ng.IFilterService,
private $timeout: ng.ITimeoutService,
private $q: ng.IQService,
private apDataService: DataService) { }
constructor(private NgTableParams,
private $filter: ng.IFilterService,
private $timeout: ng.ITimeoutService,
private $q: ng.IQService,
private apDataService: DataService) {
}

$onInit() {

Expand All @@ -52,7 +51,7 @@ export class GroupManagerController {
data.assigned.length = 0;
data.selectedAssigned.length = 0;


_.each(data.all, item => {
if (_.indexOf(map, item.ID) > -1) {
// Already assigned
Expand Down Expand Up @@ -157,7 +156,7 @@ export class GroupManagerController {
}).then((response: IXMLUser[]) => {
// Assume that valid users all have email addresses and services/groups don't
_.each(response, user => this.users.all.push(user));

deferred.resolve(this.users.all);
});
return deferred.promise;
Expand All @@ -173,7 +172,7 @@ export class GroupManagerController {
*/
mergeGroups() {
this.updatePermissions('AddUserToGroup', this.users.assigned, [this.targetGroup])
.then( (promiseArray) => {
.then((promiseArray) => {
toastr.success(promiseArray.length + ' users successfully merged.');
// Reset dropdowns to empty
this.sourceGroup = undefined;
Expand Down Expand Up @@ -243,7 +242,7 @@ export class GroupManagerController {
operation: operation, // AddUserToGroup || RemoveUserFromGroup'
groupName: group.Name,
userLoginName: user.LoginName
}).then( (response) => {
}).then((response) => {
deferred.resolve(response);
});

Expand All @@ -256,7 +255,7 @@ export class GroupManagerController {
this.groups.clearSelected();

// Resolved when all promises complete
this.$q.all(queue).then( (responses) => {
this.$q.all(queue).then((responses) => {
toastr.success(operation === 'AddUserToGroup' ?
'User successfully added' :
'User successfully removed');
Expand Down
18 changes: 5 additions & 13 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
{
"compilerOptions": {
"noImplicitAny": false,
"module": "es2015",
"target": "es5",
"emitDecoratorMetadata": true,
"noImplicitAny": false,
"sourceMap": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"declaration": true,
"moduleResolution": "node",
"types": [
"hammerjs",
"jasmine",
"node"
],
"lib": ["es2015", "dom"]
},
"typeRoots": [
"./node_modules/@types"
],
"exclude": [
"out",
"node_modules",
"dist",
"dev",
"reports"
],
"version": "2.0.6"
"dist"
]
}
8 changes: 5 additions & 3 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"class-name": true,
"comment-format": [
Expand All @@ -16,6 +13,7 @@
"spaces"
],
"label-position": true,
// "label-undefined": true,
"max-line-length": [
true,
140
Expand All @@ -38,6 +36,7 @@
],
"no-construct": true,
"no-debugger": true,
// "no-duplicate-key": true,
"no-duplicate-variable": true,
"no-empty": false,
"no-eval": true,
Expand All @@ -47,6 +46,9 @@
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
// "no-unused-parameters": true,
// "no-unused-locals": true,
// "no-unreachable": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
Expand Down

0 comments on commit 5323137

Please sign in to comment.