Commit f3432726ef92306417c061c262b1a0c46f673ba0
1 parent
d0a93cc6d1
Exists in
master
added csv method
Showing
6 changed files
with
61 additions
and
45 deletions
Show diff stats
.meteor/packages
1 | # Meteor packages used by this project, one per line. | 1 | # Meteor packages used by this project, one per line. |
2 | # Check this file (and the other files in this directory) into your repository. | 2 | # Check this file (and the other files in this directory) into your repository. |
3 | # | 3 | # |
4 | # 'meteor add' and 'meteor remove' will edit this file for you, | 4 | # 'meteor add' and 'meteor remove' will edit this file for you, |
5 | # but you can also edit it by hand. | 5 | # but you can also edit it by hand. |
6 | 6 | ||
7 | meteor-base@1.0.4 # Packages every Meteor app needs to have | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have |
8 | mobile-experience@1.0.4 # Packages for a great mobile UX | 8 | mobile-experience@1.0.4 # Packages for a great mobile UX |
9 | mongo@1.1.15 # The database Meteor supports right now | 9 | mongo@1.1.16 # The database Meteor supports right now |
10 | reactive-var@1.0.11 # Reactive variable for tracker | 10 | reactive-var@1.0.11 # Reactive variable for tracker |
11 | session | 11 | session@1.1.7 |
12 | tracker@1.1.2 # Meteor's client-side reactive programming library | 12 | tracker@1.1.2 # Meteor's client-side reactive programming library |
13 | 13 | ||
14 | standard-minifier-css@1.3.3 # CSS minifier run for production mode | 14 | standard-minifier-css@1.3.4 # CSS minifier run for production mode |
15 | standard-minifier-js@1.2.2 # JS minifier run for production mode | 15 | standard-minifier-js@1.2.3 # JS minifier run for production mode |
16 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. | 16 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. |
17 | ecmascript@0.6.3 # Enable ECMAScript2015+ syntax in app code | 17 | ecmascript@0.6.3 # Enable ECMAScript2015+ syntax in app code |
18 | 18 | ||
19 | accounts-password | 19 | accounts-password@1.3.4 |
20 | accounts-base@1.2.14 | 20 | accounts-base@1.2.15 |
21 | check | 21 | check@1.2.5 |
22 | audit-argument-checks@1.0.7 | 22 | audit-argument-checks@1.0.7 |
23 | browser-policy@1.1.0 | 23 | browser-policy@1.1.0 |
24 | 24 | ||
25 | fourseven:scss | 25 | fourseven:scss |
26 | aldeed:collection2 | 26 | aldeed:collection2 |
27 | alanning:roles | 27 | alanning:roles |
28 | themeteorchef:bert | 28 | themeteorchef:bert |
29 | static-html@1.1.11 | 29 | static-html@1.1.11 |
30 | xolvio:cleaner | 30 | xolvio:cleaner |
31 | practicalmeteor:mocha | 31 | practicalmeteor:mocha |
32 | xolvio:backdoor | 32 | xolvio:backdoor |
33 | mdg:validated-method | 33 | mdg:validated-method |
34 | dburles:factory@1.0.0 | 34 | dburles:factory@1.0.0 |
35 | ddp-rate-limiter@1.0.6 | 35 | ddp-rate-limiter@1.0.7 |
36 | shell-server@0.2.2 | 36 | shell-server@0.2.3 |
37 | aldeed:simple-schema | 37 | aldeed:simple-schema |
38 | momentjs:moment | 38 | momentjs:moment |
39 | meteorhacks:picker | 39 | meteorhacks:picker |
40 | harrison:papa-parse | ||
41 | ostrio:files | ||
40 | 42 |
.meteor/release
1 | METEOR@1.4.3.1 | 1 | METEOR@1.4.3.2 |
2 | 2 |
.meteor/versions
1 | accounts-base@1.2.14 | 1 | accounts-base@1.2.15 |
2 | accounts-password@1.3.4 | 2 | accounts-password@1.3.4 |
3 | alanning:roles@1.2.16 | 3 | alanning:roles@1.2.16 |
4 | aldeed:collection2@2.10.0 | 4 | aldeed:collection2@2.10.0 |
5 | aldeed:collection2-core@1.2.0 | 5 | aldeed:collection2-core@1.2.0 |
6 | aldeed:schema-deny@1.1.0 | 6 | aldeed:schema-deny@1.1.0 |
7 | aldeed:schema-index@1.1.1 | 7 | aldeed:schema-index@1.1.1 |
8 | aldeed:simple-schema@1.5.3 | 8 | aldeed:simple-schema@1.5.3 |
9 | allow-deny@1.0.5 | 9 | allow-deny@1.0.5 |
10 | audit-argument-checks@1.0.7 | 10 | audit-argument-checks@1.0.7 |
11 | autoupdate@1.3.12 | 11 | autoupdate@1.3.12 |
12 | babel-compiler@6.14.1 | 12 | babel-compiler@6.14.1 |
13 | babel-runtime@1.0.1 | 13 | babel-runtime@1.0.1 |
14 | base64@1.0.10 | 14 | base64@1.0.10 |
15 | binary-heap@1.0.10 | 15 | binary-heap@1.0.10 |
16 | blaze@2.3.0 | 16 | blaze@2.3.2 |
17 | blaze-tools@1.0.10 | 17 | blaze-tools@1.0.10 |
18 | boilerplate-generator@1.0.11 | 18 | boilerplate-generator@1.0.11 |
19 | browser-policy@1.1.0 | 19 | browser-policy@1.1.0 |
20 | browser-policy-common@1.0.11 | 20 | browser-policy-common@1.0.11 |
21 | browser-policy-content@1.1.0 | 21 | browser-policy-content@1.1.0 |
22 | browser-policy-framing@1.1.0 | 22 | browser-policy-framing@1.1.0 |
23 | caching-compiler@1.1.9 | 23 | caching-compiler@1.1.9 |
24 | caching-html-compiler@1.1.0 | 24 | caching-html-compiler@1.1.2 |
25 | callback-hook@1.0.10 | 25 | callback-hook@1.0.10 |
26 | check@1.2.5 | 26 | check@1.2.5 |
27 | coffeescript@1.12.3_1 | 27 | coffeescript@1.12.3_1 |
28 | dburles:factory@1.1.0 | 28 | dburles:factory@1.1.0 |
29 | ddp@1.2.5 | 29 | ddp@1.2.5 |
30 | ddp-client@1.3.3 | 30 | ddp-client@1.3.3 |
31 | ddp-common@1.2.8 | 31 | ddp-common@1.2.8 |
32 | ddp-rate-limiter@1.0.6 | 32 | ddp-rate-limiter@1.0.7 |
33 | ddp-server@1.3.13 | 33 | ddp-server@1.3.13 |
34 | deps@1.0.12 | 34 | deps@1.0.12 |
35 | diff-sequence@1.0.7 | 35 | diff-sequence@1.0.7 |
36 | ecmascript@0.6.3 | 36 | ecmascript@0.6.3 |
37 | ecmascript-runtime@0.3.15 | 37 | ecmascript-runtime@0.3.15 |
38 | ejson@1.0.13 | 38 | ejson@1.0.13 |
39 | email@1.1.18 | 39 | email@1.1.18 |
40 | es5-shim@4.6.15 | 40 | es5-shim@4.6.15 |
41 | fastclick@1.0.13 | 41 | fastclick@1.0.13 |
42 | fortawesome:fontawesome@4.7.0 | 42 | fortawesome:fontawesome@4.7.0 |
43 | fourseven:scss@3.13.0 | 43 | fourseven:scss@3.13.0 |
44 | geojson-utils@1.0.10 | 44 | geojson-utils@1.0.10 |
45 | harrison:papa-parse@1.1.7 | ||
45 | hot-code-push@1.0.4 | 46 | hot-code-push@1.0.4 |
46 | html-tools@1.0.11 | 47 | html-tools@1.0.11 |
47 | htmljs@1.0.11 | 48 | htmljs@1.0.11 |
48 | http@1.2.11 | 49 | http@1.2.12 |
49 | id-map@1.0.9 | 50 | id-map@1.0.9 |
50 | jquery@1.11.10 | 51 | jquery@1.11.10 |
51 | launch-screen@1.1.1 | 52 | launch-screen@1.1.1 |
52 | livedata@1.0.18 | 53 | livedata@1.0.18 |
53 | localstorage@1.0.12 | 54 | localstorage@1.0.12 |
54 | logging@1.1.17 | 55 | logging@1.1.17 |
55 | mdg:validated-method@1.1.0 | 56 | mdg:validated-method@1.1.0 |
56 | mdg:validation-error@0.5.1 | 57 | mdg:validation-error@0.5.1 |
57 | meteor@1.6.1 | 58 | meteor@1.6.1 |
58 | meteor-base@1.0.4 | 59 | meteor-base@1.0.4 |
59 | meteorhacks:picker@1.0.3 | 60 | meteorhacks:picker@1.0.3 |
60 | minifier-css@1.2.16 | 61 | minifier-css@1.2.16 |
61 | minifier-js@1.2.18 | 62 | minifier-js@1.2.18 |
62 | minimongo@1.0.20 | 63 | minimongo@1.0.21 |
63 | mobile-experience@1.0.4 | 64 | mobile-experience@1.0.4 |
64 | mobile-status-bar@1.0.14 | 65 | mobile-status-bar@1.0.14 |
65 | modules@0.7.9 | 66 | modules@0.7.9 |
66 | modules-runtime@0.7.9 | 67 | modules-runtime@0.7.9 |
67 | momentjs:moment@2.17.1 | 68 | momentjs:moment@2.18.1 |
68 | mongo@1.1.15 | 69 | mongo@1.1.16 |
69 | mongo-id@1.0.6 | 70 | mongo-id@1.0.6 |
70 | npm-bcrypt@0.9.2 | 71 | npm-bcrypt@0.9.2 |
71 | npm-mongo@2.2.16_1 | 72 | npm-mongo@2.2.24 |
72 | observe-sequence@1.0.15 | 73 | observe-sequence@1.0.16 |
73 | ordered-dict@1.0.9 | 74 | ordered-dict@1.0.9 |
75 | ostrio:cookies@2.2.0 | ||
76 | ostrio:files@1.7.13 | ||
74 | practicalmeteor:chai@2.1.0_1 | 77 | practicalmeteor:chai@2.1.0_1 |
75 | practicalmeteor:loglevel@1.2.0_2 | 78 | practicalmeteor:loglevel@1.2.0_2 |
76 | practicalmeteor:mocha@2.4.5_6 | 79 | practicalmeteor:mocha@2.4.5_6 |
77 | practicalmeteor:mocha-core@1.0.1 | 80 | practicalmeteor:mocha-core@1.0.1 |
78 | practicalmeteor:sinon@1.14.1_2 | 81 | practicalmeteor:sinon@1.14.1_2 |
79 | promise@0.8.8 | 82 | promise@0.8.8 |
80 | raix:eventemitter@0.1.3 | 83 | raix:eventemitter@0.1.3 |
81 | random@1.0.10 | 84 | random@1.0.10 |
82 | rate-limit@1.0.6 | 85 | rate-limit@1.0.7 |
83 | reactive-dict@1.1.8 | 86 | reactive-dict@1.1.8 |
84 | reactive-var@1.0.11 | 87 | reactive-var@1.0.11 |
85 | reload@1.1.11 | 88 | reload@1.1.11 |
86 | retry@1.0.9 | 89 | retry@1.0.9 |
87 | routepolicy@1.0.12 | 90 | routepolicy@1.0.12 |
88 | service-configuration@1.0.11 | 91 | service-configuration@1.0.11 |
89 | session@1.1.7 | 92 | session@1.1.7 |
90 | sha@1.0.9 | 93 | sha@1.0.9 |
91 | shell-server@0.2.3 | 94 | shell-server@0.2.3 |
92 | spacebars@1.0.13 | 95 | spacebars@1.0.15 |
93 | spacebars-compiler@1.1.0 | 96 | spacebars-compiler@1.1.2 |
94 | srp@1.0.10 | 97 | srp@1.0.10 |
95 | standard-minifier-css@1.3.4 | 98 | standard-minifier-css@1.3.4 |
96 | standard-minifier-js@1.2.3 | 99 | standard-minifier-js@1.2.3 |
97 | static-html@1.2.0 | 100 | static-html@1.2.2 |
98 | templating@1.3.0 | 101 | templating@1.3.2 |
99 | templating-compiler@1.3.0 | 102 | templating-compiler@1.3.2 |
100 | templating-runtime@1.3.0 | 103 | templating-runtime@1.3.2 |
101 | templating-tools@1.1.0 | 104 | templating-tools@1.1.2 |
102 | themeteorchef:bert@2.1.1 | 105 | themeteorchef:bert@2.1.1 |
103 | tmeasday:test-reporter-helpers@0.2.1 | 106 | tmeasday:test-reporter-helpers@0.2.1 |
104 | tracker@1.1.2 | 107 | tracker@1.1.2 |
105 | ui@1.0.12 | 108 | ui@1.0.13 |
106 | underscore@1.0.10 | 109 | underscore@1.0.10 |
107 | url@1.1.0 | 110 | url@1.1.0 |
108 | webapp@1.3.13 | 111 | webapp@1.3.14 |
109 | webapp-hashing@1.0.9 | 112 | webapp-hashing@1.0.9 |
110 | xolvio:backdoor@0.2.1 | 113 | xolvio:backdoor@0.2.1 |
111 | xolvio:cleaner@0.3.1 | 114 | xolvio:cleaner@0.3.1 |
112 | 115 |
imports/client/views/org/admin/students/UploadCsv.js
1 | import _ from 'lodash'; | 1 | import _ from 'lodash'; |
2 | import { Meteor } from 'meteor/meteor'; | 2 | import { Meteor } from 'meteor/meteor'; |
3 | 3 | ||
4 | import React, { Component } from 'react'; | 4 | import React, { Component } from 'react'; |
5 | import { Link,browserHistory } from 'react-router'; | 5 | import { Link,browserHistory } from 'react-router'; |
6 | import { FormGroup,Panel,Table, | 6 | import { FormGroup,Panel,Table, |
7 | ButtonToolbar,Modal,ControlLabel,HelpBlock, | 7 | ButtonToolbar,Modal,ControlLabel,HelpBlock, |
8 | FormControl,Glyphicon,Button } from 'react-bootstrap'; | 8 | FormControl,Glyphicon,Button } from 'react-bootstrap'; |
9 | // import { AddStudentForm } from './addStudentForm'; | 9 | // import { AddStudentForm } from './addStudentForm'; |
10 | 10 | import { FilesCollection } from 'meteor/ostrio:files'; | |
11 | const Papa = this.Papa; | ||
12 | // console.log(this); | ||
11 | const style = { | 13 | const style = { |
12 | margin: 12, | 14 | margin: 12, |
13 | }; | 15 | }; |
14 | function FieldGroup({ id, label, help, ...props }) { | 16 | function FieldGroup({ id, label, help, ...props }) { |
15 | return ( | 17 | return ( |
16 | <FormGroup controlId={id}> | 18 | <FormGroup controlId={id}> |
17 | <ControlLabel>{label}</ControlLabel> | 19 | <ControlLabel>{label}</ControlLabel> |
18 | <FormControl {...props} /> | 20 | <FormControl {...props} /> |
19 | {help && <HelpBlock>{help}</HelpBlock>} | 21 | {help && <HelpBlock>{help}</HelpBlock>} |
20 | </FormGroup> | 22 | </FormGroup> |
21 | ); | 23 | ); |
22 | } | 24 | } |
23 | export class UploadCsv extends Component { | 25 | export class UploadCsv extends Component { |
24 | constructor(props) { | 26 | constructor(props) { |
25 | super(props); | 27 | super(props); |
26 | this.state = { | 28 | this.state = { |
27 | show: false | 29 | show: false |
28 | }; | 30 | }; |
29 | this.showModal = this.showModal.bind(this); | 31 | this.showModal = this.showModal.bind(this); |
30 | this.hideModal = this.hideModal.bind(this); | 32 | this.hideModal = this.hideModal.bind(this); |
31 | this.onUpdate = this.onUpdate.bind(this); | 33 | this.onUpdate = this.onUpdate.bind(this); |
32 | }; | 34 | }; |
33 | 35 | ||
34 | showModal() { | 36 | showModal() { |
35 | this.setState({show: true}); | 37 | this.setState({show: true}); |
36 | } | 38 | } |
37 | 39 | ||
38 | hideModal() { | 40 | hideModal() { |
39 | this.setState({show: false}); | 41 | this.setState({show: false}); |
40 | } | 42 | } |
41 | onUpdate(key, value) { | 43 | onUpdate(key, value) { |
42 | this.setState({[key]: value}); | 44 | this.setState({[key]: value}); |
43 | }; | 45 | }; |
44 | uploadStudentCsv(e){ | 46 | uploadStudentCsv(e){ |
45 | e.preventDefault(); | 47 | e.preventDefault(); |
46 | e.persist(); | 48 | e.persist(); |
47 | csvData = ""; | 49 | var file = $('input[type="file"]').prop("files")[0]; |
48 | Meteor.call('student.uploadCsv', csvData, function (error, result) { | 50 | Papa.parse(file, { |
51 | complete: function(results) { | ||
52 | if(results){ | ||
53 | Meteor.call('student.uploadCsv', csvData, function (error, result) { | ||
49 | 54 | ||
50 | }) | 55 | }) |
56 | } | ||
57 | } | ||
58 | }); | ||
51 | } | 59 | } |
52 | 60 | ||
53 | render() { | 61 | render() { |
54 | console.log(this.props); | 62 | console.log(this.props); |
55 | return ( | 63 | return ( |
56 | <ButtonToolbar> | 64 | <ButtonToolbar> |
57 | <Button bsStyle="primary" onClick={this.showModal}> | 65 | <Button bsStyle="primary" onClick={this.showModal}> |
58 | Upload CSV | 66 | Upload CSV |
59 | </Button> | 67 | </Button> |
60 | <Modal | 68 | <Modal |
61 | {...this.props} | 69 | {...this.props} |
62 | show={this.state.show} | 70 | show={this.state.show} |
63 | onHide={this.hideModal} | 71 | onHide={this.hideModal} |
64 | dialogClassName="custom-modal" | 72 | dialogClassName="custom-modal" |
65 | > | 73 | > |
66 | <Modal.Header closeButton> | 74 | <Modal.Header closeButton> |
67 | <Modal.Title id="contained-modal-title-lg">New Student</Modal.Title> | 75 | <Modal.Title id="contained-modal-title-lg">New Student</Modal.Title> |
68 | </Modal.Header> | 76 | </Modal.Header> |
69 | <Modal.Body> | 77 | <Modal.Body> |
70 | <form onSubmit={ (e) => this.uploadStudentCsv(e) } > | 78 | <form onSubmit={ (e) => this.uploadStudentCsv(e) } > |
71 | <FieldGroup | 79 | <FieldGroup |
72 | id="formControlsFile" | 80 | id="formControlsFile" |
73 | type="file" | 81 | type="file" |
74 | label="File" | 82 | label="File" |
75 | help="Upload you CSV here." | 83 | help="Upload you CSV here." |
76 | /> | 84 | /> |
77 | <Button type="submit" bsStyle="default">Upload File</Button> | 85 | <Button type="submit" bsStyle="default">Upload File</Button> |
78 | </form> | 86 | </form> |
79 | </Modal.Body> | 87 | </Modal.Body> |
80 | <Modal.Footer> | 88 | <Modal.Footer> |
81 | <Button onClick={this.hideModal}>Close</Button> | 89 | <Button onClick={this.hideModal}>Close</Button> |
82 | </Modal.Footer> | 90 | </Modal.Footer> |
83 | </Modal> | 91 | </Modal> |
84 | </ButtonToolbar> | 92 | </ButtonToolbar> |
85 | ); | 93 | ); |
86 | }; | 94 | }; |
87 | 95 | ||
88 | }; | 96 | }; |
89 | 97 |
imports/collections/orgs/methods.js
1 | // import { } from '/imports/collections/orgs/methods'; | 1 | // import { } from '/imports/collections/orgs/methods'; |
2 | import _ from 'lodash'; | 2 | import _ from 'lodash'; |
3 | import { Meteor } from 'meteor/meteor'; | 3 | import { Meteor } from 'meteor/meteor'; |
4 | import { ValidatedMethod } from 'meteor/mdg:validated-method'; | 4 | import { ValidatedMethod } from 'meteor/mdg:validated-method'; |
5 | import { SimpleSchema } from 'meteor/aldeed:simple-schema'; | 5 | import { SimpleSchema } from 'meteor/aldeed:simple-schema'; |
6 | import { DDPRateLimiter } from 'meteor/ddp-rate-limiter'; | 6 | import { DDPRateLimiter } from 'meteor/ddp-rate-limiter'; |
7 | import { Bert } from 'meteor/themeteorchef:bert'; | 7 | import { Bert } from 'meteor/themeteorchef:bert'; |
8 | import { Users } from '/imports/collections/users/index'; | 8 | import { Users } from '/imports/collections/users/index'; |
9 | import { Orgs } from '/imports/collections/orgs/index'; | 9 | import { Orgs } from '/imports/collections/orgs/index'; |
10 | // import { sendNotificationAPN } from '/imports/server/push/methods'; | 10 | // import { sendNotificationAPN } from '/imports/server/push/methods'; |
11 | export const orgMethod = new ValidatedMethod({ | 11 | export const orgMethod = new ValidatedMethod({ |
12 | name: 'org.method', | 12 | name: 'org.method', |
13 | 13 | ||
14 | validate: new SimpleSchema({ | 14 | validate: new SimpleSchema({ |
15 | itemId: { type: String }, | 15 | itemId: { type: String }, |
16 | }).validator(), | 16 | }).validator(), |
17 | 17 | ||
18 | run({itemId}) { | 18 | run({itemId}) { |
19 | return {}; | 19 | return {}; |
20 | }, | 20 | }, |
21 | 21 | ||
22 | }); | 22 | }); |
23 | 23 | ||
24 | export const checkExistingOrg = new ValidatedMethod({ | 24 | export const checkExistingOrg = new ValidatedMethod({ |
25 | name: 'checkExistingOrg', | 25 | name: 'checkExistingOrg', |
26 | validate: new SimpleSchema({ | 26 | validate: new SimpleSchema({ |
27 | slug: { type: String }, | 27 | slug: { type: String }, |
28 | }).validator(), | 28 | }).validator(), |
29 | 29 | ||
30 | run({slug}) { | 30 | run({slug}) { |
31 | org = Orgs.findOne({slug:slug}); | 31 | org = Orgs.findOne({slug:slug}); |
32 | return org; | 32 | return org; |
33 | }, | 33 | }, |
34 | }); | 34 | }); |
35 | 35 | ||
36 | export const checkEmailInOrg = new ValidatedMethod({ | 36 | export const checkEmailInOrg = new ValidatedMethod({ |
37 | name: 'checkEmailInOrg', | 37 | name: 'checkEmailInOrg', |
38 | 38 | ||
39 | validate: new SimpleSchema({ | 39 | validate: new SimpleSchema({ |
40 | email: { type: String }, | 40 | email: { type: String }, |
41 | orgId: { type: String }, | 41 | orgId: { type: String }, |
42 | }).validator(), | 42 | }).validator(), |
43 | 43 | ||
44 | run({email, orgId}) { | 44 | run({email, orgId}) { |
45 | console.log(orgId); | 45 | console.log(orgId); |
46 | user = Users.findOne({"orgId":orgId, "emails.address":email}); | 46 | user = Users.findOne({"orgId":orgId, "emails.address":email}); |
47 | if(user){ | 47 | if(user){ |
48 | return {success:true} | 48 | return {success:true} |
49 | }else{ | 49 | }else{ |
50 | return {success:false} | 50 | return {success:false} |
51 | } | 51 | } |
52 | }, | 52 | }, |
53 | }); | 53 | }); |
54 | 54 | ||
55 | export const studentCsvParse = new ValidatedMethod({ | 55 | export const save_csv_data = new ValidatedMethod({ |
56 | name: 'org.studentCsvParse', | 56 | name: 'save_csv_data', |
57 | 57 | ||
58 | validate: new SimpleSchema({ | 58 | validate: null, |
59 | data: { type: [Object] }, | ||
60 | }).validator(), | ||
61 | 59 | ||
62 | run(data) { | 60 | run(item,filename) { |
63 | console.log(data); | 61 | var csv = json2csv({ |
64 | return { | 62 | data: item, |
65 | 63 | fields: csv_students_fields | |
66 | }; | 64 | }); |
65 | fs.writeFile(filename, csv,function(err) { | ||
66 | if (err) throw err; | ||
67 | }); | ||
67 | }, | 68 | }, |
package.json
1 | { | 1 | { |
2 | "name": "application-name", | 2 | "name": "application-name", |
3 | "version": "1.0.0", | 3 | "version": "1.0.0", |
4 | "description": "Application description.", | 4 | "description": "Application description.", |
5 | "scripts": { | 5 | "scripts": { |
6 | "start": "meteor --settings settings-development.json", | 6 | "start": "meteor --settings settings-development.json", |
7 | "test": "meteor test --driver-package practicalmeteor:mocha --port 5000", | 7 | "test": "meteor test --driver-package practicalmeteor:mocha --port 5000", |
8 | "chimp-watch": "chimp --ddp=http://localhost:3000 --watch --mocha --path=tests", | 8 | "chimp-watch": "chimp --ddp=http://localhost:3000 --watch --mocha --path=tests", |
9 | "chimp-test": "chimp --ddp=http://localhost:3000 --mocha --path=tests", | 9 | "chimp-test": "chimp --ddp=http://localhost:3000 --mocha --path=tests", |
10 | "staging": "meteor deploy staging.meteor.com --settings settings-development.json", | 10 | "staging": "meteor deploy staging.meteor.com --settings settings-development.json", |
11 | "production": "meteor deploy production.meteor.com --settings settings-production.json" | 11 | "production": "meteor deploy production.meteor.com --settings settings-production.json" |
12 | }, | 12 | }, |
13 | "devDependencies": { | 13 | "devDependencies": { |
14 | "chimp": "^0.41.2", | 14 | "chimp": "^0.41.2", |
15 | "eslint": "^3.8.1", | 15 | "eslint": "^3.8.1", |
16 | "eslint-config-airbnb": "^12.0.0", | 16 | "eslint-config-airbnb": "^12.0.0", |
17 | "eslint-plugin-import": "^1.16.0", | 17 | "eslint-plugin-import": "^1.16.0", |
18 | "eslint-plugin-jsx-a11y": "^2.2.3", | 18 | "eslint-plugin-jsx-a11y": "^2.2.3", |
19 | "eslint-plugin-meteor": "^4.0.1", | 19 | "eslint-plugin-meteor": "^4.0.1", |
20 | "eslint-plugin-react": "^6.4.1" | 20 | "eslint-plugin-react": "^6.4.1" |
21 | }, | 21 | }, |
22 | "eslintConfig": { | 22 | "eslintConfig": { |
23 | "parserOptions": { | 23 | "parserOptions": { |
24 | "ecmaFeatures": { | 24 | "ecmaFeatures": { |
25 | "jsx": true | 25 | "jsx": true |
26 | } | 26 | } |
27 | }, | 27 | }, |
28 | "plugins": [ | 28 | "plugins": [ |
29 | "meteor", | 29 | "meteor", |
30 | "react" | 30 | "react" |
31 | ], | 31 | ], |
32 | "extends": [ | 32 | "extends": [ |
33 | "airbnb/base", | 33 | "airbnb/base", |
34 | "plugin:meteor/guide", | 34 | "plugin:meteor/guide", |
35 | "plugin:react/recommended" | 35 | "plugin:react/recommended" |
36 | ], | 36 | ], |
37 | "env": { | 37 | "env": { |
38 | "browser": true | 38 | "browser": true |
39 | }, | 39 | }, |
40 | "globals": { | 40 | "globals": { |
41 | "server": false, | 41 | "server": false, |
42 | "browser": false, | 42 | "browser": false, |
43 | "expect": false | 43 | "expect": false |
44 | }, | 44 | }, |
45 | "rules": { | 45 | "rules": { |
46 | "import/no-unresolved": 0, | 46 | "import/no-unresolved": 0, |
47 | "import/no-extraneous-dependencies": 0, | 47 | "import/no-extraneous-dependencies": 0, |
48 | "import/extensions": 0, | 48 | "import/extensions": 0, |
49 | "no-underscore-dangle": [ | 49 | "no-underscore-dangle": [ |
50 | "error", | 50 | "error", |
51 | { | 51 | { |
52 | "allow": [ | 52 | "allow": [ |
53 | "_id", | 53 | "_id", |
54 | "_ensureIndex", | 54 | "_ensureIndex", |
55 | "_verifyEmailToken", | 55 | "_verifyEmailToken", |
56 | "_resetPasswordToken", | 56 | "_resetPasswordToken", |
57 | "_name" | 57 | "_name" |
58 | ] | 58 | ] |
59 | } | 59 | } |
60 | ], | 60 | ], |
61 | "class-methods-use-this": 0 | 61 | "class-methods-use-this": 0 |
62 | } | 62 | } |
63 | }, | 63 | }, |
64 | "dependencies": { | 64 | "dependencies": { |
65 | "babel-runtime": "^6.18.0", | 65 | "babel-runtime": "^6.18.0", |
66 | "babyparse": "^0.4.6", | 66 | "babyparse": "^0.4.6", |
67 | "bcrypt": "^0.8.7", | 67 | "bcrypt": "^0.8.7", |
68 | "bootstrap": "^4.0.0-alpha.6", | 68 | "bootstrap": "^4.0.0-alpha.6", |
69 | "csvtojson": "^1.1.4", | ||
70 | "fs": "0.0.1-security", | ||
69 | "jquery": "^2.2.4", | 71 | "jquery": "^2.2.4", |
70 | "jquery-validation": "^1.15.1", | 72 | "jquery-validation": "^1.15.1", |
71 | "material-fabmenu": "0.0.1", | 73 | "material-fabmenu": "0.0.1", |
72 | "material-ui": "^0.17.1", | 74 | "material-ui": "^0.17.1", |
75 | "meteor-node-stubs": "^0.2.6", | ||
73 | "moment": "^2.18.0", | 76 | "moment": "^2.18.0", |
74 | "react": "^15.4.2", | 77 | "react": "^15.4.2", |
75 | "react-addons-css-transition-group": "^15.4.2", | 78 | "react-addons-css-transition-group": "^15.4.2", |
76 | "react-addons-pure-render-mixin": "^15.3.2", | 79 | "react-addons-pure-render-mixin": "^15.3.2", |
77 | "react-addons-transition-group": "^15.4.2", | 80 | "react-addons-transition-group": "^15.4.2", |
78 | "react-bootstrap": "^0.30.8", | 81 | "react-bootstrap": "^0.30.8", |
79 | "react-bootstrap-date-picker": "^4.0.0", | 82 | "react-bootstrap-date-picker": "^4.0.0", |
80 | "react-dom": "^15.4.2", | 83 | "react-dom": "^15.4.2", |
81 | "react-fontawesome": "^1.5.0", | 84 | "react-fontawesome": "^1.5.0", |
82 | "react-komposer": "^1.13.1", | 85 | "react-komposer": "^1.13.1", |
83 | "react-router": "^2.6.1", | 86 | "react-router": "^2.6.1", |
84 | "react-router-bootstrap": "^0.23.1", | 87 | "react-router-bootstrap": "^0.23.1", |
85 | "react-svg": "^2.1.19", | 88 | "react-svg": "^2.1.19", |
86 | "react-tap-event-plugin": "^2.0.1", | 89 | "react-tap-event-plugin": "^2.0.1", |
87 | "reactstrap": "^4.3.0", | 90 | "reactstrap": "^4.3.0", |
88 | "velocity-animate": "^1.4.3", | 91 | "velocity-animate": "^1.4.3", |
89 | "velocity-react": "^1.2.1" | 92 | "velocity-react": "^1.2.1" |
90 | } | 93 | } |
91 | } | 94 | } |
92 | 95 |