<commit_before>import Reflux from 'reflux';
import $ from 'jQuery';
import projectsData from './projectsData';

let ProjectsActions = Reflux.createActions([
  'loadProjects',
  'loadProjectsSuccess',
  'loadProjectsError'
]);

ProjectsActions.loadProjects.preEmit = function(data){
  let endpoint = "http://localhost:1337/js/app/mock.json";
  let promise = $.ajax({ url: endpoint, type: 'GET', dataType: 'json' });

  promise.success( (resp) => {
    projectsData.manageResponse(resp, function(data){<commit_msg>make mock data path relative<commit_after>import Reflux from 'reflux';
import $ from 'jQuery';
import projectsData from './projectsData';

let ProjectsActions = Reflux.createActions([
  'loadProjects',
  'loadProjectsSuccess',
  'loadProjectsError'
]);

ProjectsActions.loadProjects.preEmit = function(data){
  let endpoint = "/js/app/mock.json";
  let promise = $.ajax({ url: endpoint, type: 'GET', dataType: 'json' });

  promise.success( (resp) => {
    projectsData.manageResponse(resp, function(data){
{'fraction_non_alphanumeric': 0.14931237721021612, 'fraction_numerical': 0.003929273084479371, 'mean_word_length': 5.574193548387097, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3862578', 'n_tokens_mistral': 324, 'n_tokens_neox': 313, 'n_words': 73}